How do I cancel 'dropped' handling after desire one executes ?

7 posts, 0 answers
  1. RichardAD
    RichardAD avatar
    105 posts
    Member since:
    Feb 2012

    Posted 29 Mar 2012 Link to this post

    When there are multiple handlers for a drop location, after handling the one I want, how do I prevent anymore handlers from firing ?

    See http://jsfiddle.net/RichardAD/qYQ7m/

    Do I use a kendo feature or capture/bubble I've read about but don't understand yet.

    Thanks,
    Richard
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 29 Mar 2012 Link to this post

    Hello,

    The Drag & Drop received some overhaul for Q1, and this includes the drop target logic. I updated the jsfiddle to point to the new kendo scripts, and it actually achieved what I think you want. 

    http://jsfiddle.net/qYQ7m/10/

    One thing to notice is that the order of the drop targets declaration matters - I had to move the inner drop target initialization first. 

    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Kenneth
    Kenneth avatar
    70 posts
    Member since:
    Feb 2008

    Posted 01 Jul 2012 Link to this post

    It works fine when declaring drop targets inside out when I specify all the html objects in advance. However, I'm using nested kendoui grids. When I click on the master row - it calls detailInit and then dynamically builds the next grid. Have tried a lot of ways to get the drop target to work in this scenario. 

    I thought perhaps I could unbind the original drop targets, then rebuild all of the drop targets inside out once a child grid was expanded.

    I've tried removing the attribute data-role=droptarget, but doesn't fix it. I also tried removeData("kendoDropTarget), but doesn't fix it either.

    Everything works fine - until have to expand the child grids and attempt to drop items into them. When i do this, the drop target is picked up as the parent of the nested grid.

    I could create a sample - but its exactly the problem that's been described previously in the thread.

    Any thoughts?
  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 04 Jul 2012 Link to this post

    Hello Richard,

    I am afraid that there is no way to revert a dropable element to non-dropable. The only way is to delete the element and re-create is definitely not a solution in your case.
    I am sorry for the inconvenience.

    Regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Kenneth
    Kenneth avatar
    70 posts
    Member since:
    Feb 2008

    Posted 04 Jul 2012 Link to this post

    My solution was to make the drop target a child element within the master row. When you do this - the drop target associated with the master row does not cover the master row's child grid.
  7. Dean
    Dean avatar
    73 posts
    Member since:
    Oct 2012

    Posted 10 Sep 2014 in reply to Petur Subev Link to this post

    Has this changed? My project's drag/drop requirements are complex and I need to turn different combinations of drop elements on and off frequently.

    Petur Subev said:Hello Richard,

    I am afraid that there is no way to revert a dropable element to non-dropable. The only way is to delete the element and re-create is definitely not a solution in your case.
    I am sorry for the inconvenience.

    Regards,
    Petur Subev
    the Telerik team
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  8. Dean
    Dean avatar
    73 posts
    Member since:
    Oct 2012

    Posted 11 Sep 2014 in reply to Dean Link to this post

    Please ignore my last post. I was using

    kendo.ui.DropTarget.destroyGroup("groupName");

    and for some reason my html elements were being removed from the DOM. I've since tried it again and now my DOM elements remain intact. So it was my fault not the Kendo library.

    Regards
    Dean
Back to Top
Kendo UI is VS 2017 Ready