Extend draggable behavior to dynamically created elements

2 posts, 0 answers
  1. Kevin
    Kevin avatar
    4 posts
    Member since:
    Mar 2016

    Posted 17 Jan Link to this post

    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

     

     

  2. Preslav
    Admin
    Preslav avatar
    449 posts

    Posted 19 Jan Link to this post

    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.
Back to Top