How can I create a DragTemplate using the contents of a single selected row from a XamDataGrid (source)?
Awesome, thanks!
Hello Patrick,
Thank you for your patience on this matter.
I am attaching a sample project that demonstrates how to use a DragTemplate in the Infragistics Drag and Drop Framework. This also includes an MVVM solution for dragging from the XamDataGrid to a Microsoft TreeView.
In the default template for DataRecordCellArea that I have included in the sample project, the biggest thing to take note of when defining the DragDropManager.DragSource for the DragTemplate is the setting of the DataObject property. This is where the bound “Data” property within the DragTemplate objects is getting its value.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.
XDGDragAndDropDragTemplateDemo.zip
Thank you for your quick reply. I'm open to any approach for this request. I began implementing using the Drag and Drop framework. My goal is to have some sort of image or text visible when dragging a row from XamDataGrid to a WPF TreeView. I do not have a sample project as I'm just scratching the surface on this request
Thank you
I have been investigating into your requirement on this matter, and there are a few things that would go into defining a DragTemplate of your single selected row here, but there are a few dependent things that I would like to get some more information from you on first. Can you please provide some information on the following?
1. Drag and drop functionality is not built-in to the XamDataGrid, and being that you are referring to the DragTemplate property, I have to imagine you are using the Infragistics Drag and Drop Framework. Can you please confirm that this is the case?
2. Assuming the above is correct, what is the element that you are hooking the Drag and Drop Framework on? This will determine how the DataTemplate that you assign to the DragTemplate should be constructed.
3. Are you hooking the Drag and Drop Framework in XAML or through code?
4. Do you have an isolated sample project demonstrating your current implementation of drag and drop on the XamDataGrid that I could potentially modify?
Please let me know if you have any other questions or concerns on this matter.