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

Extend draggable behavior to dynamically created elements

1 Answer 745 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 17 Jan 2018, 11:36 PM

I have the base functionality of D&D working just fine. What I need to know is how to bind the behavior to dynamically created elements. I've found no reference in the documentation to allow the draggable event to bubble up to the newly created element. I don't want to have to unbind and rebind the kendoDraggable every time I create an element. Here's an example of what I'm trying to do:

https://dojo.telerik.com/OxUJE

 

Thanks

 

 

1 Answer, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 19 Jan 2018, 01:25 PM
Hi Kevin,

For the time being, there is no way to make the newly created elements draggable.

What I could suggest is assigning one more class to the newly created element, run the JavaScript code needed to make this element draggable and remove the class. For example, check the modified Dojo:
I hope this helps.


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