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 thefilter
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 thedisabled
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>