Items

The Sortable provides options for controlling the behavior of its items.

  • The filter option specifies which items inside the Sortable container will be sortable. Items which do not match the filter selector will neither be draggable nor reordered when the user drags a sortable item over them.
  • The disabled option specifies which items inside the Sortable container cannot be dragged. Items which match the disabled selector cannot be dragged but will reorder when the user drags a sortable item over them.

The following example demonstrates how to disable all items at runtime.

    <ul id="sortable">
        <li>ItemA1</li>
        <li>ItemA2</li>
        <li>ItemA3</li>
    </ul>

    <button id="btnDisable">Disable</button>

    <script>
        $("#sortable").kendoSortable({
            disabled: ".disabled"
        });

        $("#btnDisable").click(function() {
            $("#sortable").children().addClass("disabled");
        });
    </script>

See Also

In this article
Not finding the help you need? Improve this article