DnD from TreeView

4 posts, 0 answers
  1. Adam
    Adam avatar
    5 posts
    Member since:
    Feb 2012

    Posted 14 Jun 2012 Link to this post

    I am trying to get DnD to work from a TreeView to another component.  

    How do I get the item from the TreeView on drop?  I have tried e.draggable, but I cannot find the item there.  
         
    I have also tried calling $("treeview").data('kendoTreeView").select(), but it only returns the html and not the item.
    This method also has the problem where if the item is dragged, but not selected, select returns nothing.

    Thanks for the help.

    Adam


  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 15 Jun 2012 Link to this post

    You can access the source node through e.sourceNode.

    Please refer to the documentation of the drop event -- it lists all available data and actions.

    Kind 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!
  3. Kendo UI is VS 2017 Ready
  4. Adam
    Adam avatar
    5 posts
    Member since:
    Feb 2012

    Posted 15 Jun 2012 Link to this post

    Thanks for the reply.  This gives me the <li>.  I need to find my object as stored in the datasource.  I can't search by text since nodes at different levels may have the same text.
  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 18 Jun 2012 Link to this post

    You can render the uids from the dataSource in hidden input fields using the treeview templates. You can then get the hidden input value and query the dataSource by uid.

    We are currently working on tight integration between the dataSource and the treeview, which will be available with the Q2 beta that is due on June 21st. We encourage you to try it, and see if it satisfies your scenario.

    All the best,
    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!
Back to Top
Kendo UI is VS 2017 Ready