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

Enable and Disable Dragging at Runtime

Updated on Sep 8, 2026

Environment

ProductProgress® Kendo UI® Drag and Drop for jQuery
Operating SystemWindows 10 64bit
Visual Studio VersionVisual Studio 2017
Preferred LanguageJavaScript

Description

How can I enable and disable the Kendo UI Drag and Drop functionality at runtime?

Solution

To achieve the desired scenario:

  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 the implementation of the suggested approach.

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

See Also