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

Dragging from a TreeView to Grid Control.

2 Answers 72 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 29 Jul 2014, 08:55 PM
Hello,

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
-bill

2 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 31 Jul 2014, 12:50 PM
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.

Regards,
Alexander Popov
Telerik
 

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.

 
0
Bill
Top achievements
Rank 1
answered on 31 Jul 2014, 04:36 PM
thanks
Tags
TreeView
Asked by
Bill
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Bill
Top achievements
Rank 1
Share this question
or