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

Drag and Drop From Gridview to TreeView

3 Answers 187 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
bob thomash
Top achievements
Rank 1
bob thomash asked on 13 Nov 2009, 02:55 PM
Now i m having problem with RadTreeView as i have binded dynamically with class TreeViewFolder but at debug time i m getting parent node only even though i drag and drop from RadGridView to child node . Also i m trying to load image along with dragcue but i m not getting the same. image is only building with color of arrow. I want to have different image valid image when user drag items to valid treeview node or else invalid image for invalid treeview node. Also please let me know how to retrieve the selected item name from the path.

TreeView Looks Like

Personal Folder {Parent Item}
     Inbox    {Child item}
     Outbox {Child item}
     Sent Items {Child item}
     Deleted Items {Child item}

Please download Sample Application from below link:
Bob Thomash

3 Answers, 1 is accepted

Sort by
0
Accepted
Bobi
Telerik team
answered on 18 Nov 2009, 02:45 PM
Hello bob thomash,

We replied to your previous ticket : 258590.
I am pasting the reply here: 

----
I have attached your modified project to this reply. There are comments in it with how it has been changed.

Here is what I did, based on your post:
Now i m having problem with RadTreeView as i have binded dynamically with class TreeViewFolder...
 - the tree view has been bound, using a hierarchical data template

...but at debug time i m getting parent node only even though i drag and drop from RadGridView to child node .
- now you can drop objects in all folders
  
Also i m trying to load image along with dragcue but i m not getting the same. image is only building with color of arrow.
- an image has been added to the drag cue when dragging an employee, I have used the TreeViewDragCue

I want to have different image valid image when user drag items to valid treeview node or else invalid image for invalid treeview node.
an CanCotnainEmployees property has been added to your class and the drag cue is changed accordingly

 Also please let me know how to retrieve the selected item name from the path
I am not sure which path you refer to here. In your project the Id property has been used as a path and an item is selected by this path.

If i enable isDragandDrop property then i able to get RadTreeView item onDragInfo which drop my object as child node of that item which is not desired in my application.
- When the IsDragDropEnabled property is used for the TreeView it will enable all DragDrop by default. The dropped items are automatically added as children of the collection that the item will use as ItemsSource.

Regards,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
smith
Top achievements
Rank 1
answered on 21 Nov 2009, 02:33 PM
HI

 I am using Treeview to GridView Drag and Drop ,
While dropping I dont want to removbethe iteem from TreeView ,Now presently item is removed form the treeview then add to the grid
how to solve this  issue..
0
Bobi
Telerik team
answered on 23 Nov 2009, 04:30 PM
Hi smith,

Please take a look at the following online discussion:
http://www.telerik.com/community/forums/silverlight/treeview/drag-drop-not-deleting-the-dragged-object.aspx
  
I hope that this will help you.
        
Greetings,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
DragAndDrop
Asked by
bob thomash
Top achievements
Rank 1
Answers by
Bobi
Telerik team
smith
Top achievements
Rank 1
Share this question
or