Dragging from a TreeView to Grid Control.

3 posts, 0 answers
  1. Bill
    Bill avatar
    13 posts
    Member since:
    Apr 2014

    Posted 29 Jul 2014 Link to this post


    I'm looking for some guidance on how to implement a page where the user can drag items from a treeview control on to a grid.
    The constraints are:
    Don't allow the tree to be reorganized via drag and drop function.
    The tree is to be lazy loaded.

    I've tried to implement this using the kendoDraggable (using a selector to identify the nodes on the treeView) and a kendoDropTarget (with the gird as the target) this allowed me to drag the items, however the drop event never fired on the kendoDropTarget.

    I've tried to implement this using the treeView's DragAndDrop functionality, however I don't know how to retrieve the treeView node information from the parameter passed into the kendoDropTarget's drop event.

    any suggestions?

    thanks in advance
  2. Alexander Popov
    Alexander Popov avatar
    1416 posts

    Posted 31 Jul 2014 Link to this post

    Hello Bill,

    This could be achieved by using the TreeView's drag event to check over which widget the node is being dragged. This would allow you to prevent from dropping it over the TreeView, thus avoid reordering. Next you would like to use the drop event to insert a new item to the Grid's dataSource. I would recommend checking this example, where similar scenario is illustrated.

    Alexander Popov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Bill
    Bill avatar
    13 posts
    Member since:
    Apr 2014

    Posted 31 Jul 2014 in reply to Alexander Popov Link to this post

Back to Top