This is a migrated thread and some comments may be shown as answers.

reinitialize kendoDraggable

6 Answers 270 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Yaroslav
Top achievements
Rank 1
Yaroslav asked on 15 Feb 2012, 02:43 PM
I need to reinitialize kendoDraggable on list of elements that were previously initialized.

I tried doing:
$('selector').removeData("kendoDraggable")

but this does not help: I still get hing from previous definition.

6 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 20 Feb 2012, 01:21 PM
Hello Yaroslav,

While this functionality is not officially supported, you could unbind all drag events from the draggable in the following way:

$("#draggable").unbind(".kendo-dnd"); 

It is recommended that you submit a request for an official API in uservoice, since it would be more reliable than the above hack.

Regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
John
Top achievements
Rank 1
answered on 07 Mar 2014, 08:17 AM
Do you know if there is a solution for this now or is the hack method you mentioned still the only way?

Thanks
0
Alex Gyoshev
Telerik team
answered on 11 Mar 2014, 07:33 AM
Hello John,

If you get the instance of the Draggable class, you should be able to detach it by calling its destroy method.

Regards,
Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
beauXjames
Top achievements
Rank 2
answered on 02 Apr 2014, 01:53 PM
Here's an example for pulling this one off...

var $element = $(element);
if ( $element.data('kendoDraggable') ) {
    $element.data('kendoDraggable').destroy();
}
0
Todd
Top achievements
Rank 1
answered on 17 Mar 2017, 03:33 AM
is there a function simillar to kendo.ui.DropTarget.destroyGroup("group name"); to destory the draggable elements?
0
Stefan
Telerik team
answered on 22 Mar 2017, 06:58 AM
Hello Todd,

Currently, a similar function is not available for the Draggable widget.

The Draggable widgets can be destroyed only individually as shown in the previous reply.

I can suggest submitting a feature request in our feedback portal and based on its popularity we may implement it in a future release:

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/category/63713-drag-drop

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Drag and Drop
Asked by
Yaroslav
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
John
Top achievements
Rank 1
beauXjames
Top achievements
Rank 2
Todd
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or