New to Kendo UI for jQuery? Download free 30-day trial

Enable and Disable Dragging at Runtime

Your project might require you to enable or disable the Kendo UI Drag-and-Drop functionality during runtime.

To achieve this behavior:

  1. Initialize the Drag-and-Drop feature on the parent container.
  2. Use a filter to specify which items will be draggable.
  3. Change the class of the items to enable and disable them.

The following example demonstrates how to accomplish this scenario.

  <button id="btn">Enable/Disable</button>
  <div id="parent">
    <div class="draggable">Foo</div>
    <div class="draggable">Bar</div>
      filter: ".draggable:not(.disabled)",
      hint: function(element) { return element.clone(); }
    $("#btn").click(function() {

See Also

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