Hello Support,
I need to create tree view in my XamDataGrid where I can drag and drop child elements to other sections/elements of the tree view and I can also rename/edit elements of tree.
I have never used both TreeView and DragDrop before.
Can you please provide me a sample to start with? It will really help me.
Thanks in advance!
Priya
Hello Maria,
Thanks you for the sample project.
I have a question. Can we implement this same thing in XamdataGrid instead of normal grid?
If yes, then how?
Thanks & Regards,
Hello Priya,
I have created a sample project that shows how the Drag and Drop framework can be used to implement this functionality in the TreeView control. This logic is implemented for the root level of the tree and you could use this as basis to implement the functionality for the other levels too. When drag and drop channels are set the drag and drop actions are only available for elements within the same channel. In this case these are the items within the same level in the hierarchy. When the item is drop the source collection is modified to rearrange the items. I hope this is helpful for you. Please feel free to update the case if you have any other questions.
Sorry for causing confusion. I am creating a TreeView in WPF Grid.
I need to apply Drag-Drop and Edit features on all TreeViewItems. I should be able to Drag a child Item from one Parent and drop it into any of parent's sibling items.
I have 3 levels of items in my TreeView. And Drag-drop should be allowed only on same level.
Thanks,
Hello Priya and thank you for posting!
I have been looking into your description and I will need a little further clarification to understand your scenario. Would you please let me know whether you are using the WPF TreeView (System.Windows.Controls.TreeView)? What do you mean by “create tree view in my XamDataGrid”?You can have a look at our online documentation for getting started with the Drag and Drop framework:http://help.infragistics.com/doc/WPF/2014.1/CLR4.0/?page=Drag_and_Drop_Framework_Getting_Started_with_IG_Drag_and_Drop_Framework.html