Hell out there!
Maybe sbd. out the can help me. I want to implement a drag and drop operation from RadGridView to RadTreeView. But I am too silly.
So, in GridView DragQuery event, I fill the payload:
I also implemented the DropQuery and DropInfo of the TreeView:
My Problem is now, that I have no Idea how to higlight and track the target treeviewitem? When I move the mouse cursor over a treenode in drop mode, I want this treenode to be highlighted. How can this be done? And how can I find out on which node the the drop was done in DropInfo event? The destination object contains the whole treeview. Also, I should disable drop if the mouse cursor is not over a treeviewitem. How can this be done?
Can anybody help me out?
Thanks in advance.
brgds
Sven Weiberg
Maybe sbd. out the can help me. I want to implement a drag and drop operation from RadGridView to RadTreeView. But I am too silly.
So, in GridView DragQuery event, I fill the payload:
private void grdSessions_DragQuery(object sender, Telerik.Windows.Controls.DragDrop.DragDropQueryEventArgs e){ e.QueryResult = true; if (e.Options.Status != DragStatus.DragQuery) return; var sessionToDrag = (XTSession)grdSessions.SelectedItem; if (sessionToDrag != null) { e.Options.Payload = sessionToDrag; e.Options.DragCue = RadDragAndDropManager.GenerateVisualCue(); e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue(); } }I also implemented the DropQuery and DropInfo of the TreeView:
private void tvwNodes_DropQuery(object sender, Telerik.Windows.Controls.DragDrop.DragDropQueryEventArgs e) { if (e.Options.Payload is XTSession) { e.QueryResult = true; } }private void tvwNodes_DropInfo(object sender, DragDropEventArgs e) { if (e.Options.Status == DragStatus.DropComplete) { if (e.Options.Payload is XTSession) { // Do the stuff } } }My Problem is now, that I have no Idea how to higlight and track the target treeviewitem? When I move the mouse cursor over a treenode in drop mode, I want this treenode to be highlighted. How can this be done? And how can I find out on which node the the drop was done in DropInfo event? The destination object contains the whole treeview. Also, I should disable drop if the mouse cursor is not over a treeviewitem. How can this be done?
Can anybody help me out?
Thanks in advance.
brgds
Sven Weiberg