We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Drag/Drop from TreeView Node

I am having problems enabling drag/drop from a treeview control to a gridControl (not databound). I would like to override and only allow certain nodes from the treeview to be dropped on certain columns in the grid control. Currently I can not get the grid to accept any tree node. I was actually able to grab the sample OLE Drag/Drop app and drop text from the Richtext box there onto my grid control (I had no event code at the time on my grid control). Does the control only accept text? Any suggestions on how to implement this.

1 Reply

AD Administrator Syncfusion Team January 23, 2003 09:16 PM UTC

Hi Chuck, You could either implement your own IGridDataObjectConsumer. The grid has two default IGridDataObjectConsumer objects registered for "Text" and internal grid data. But you can add your more consumers for your own data. See class reference for IGridDataObjectConsumer and RegisterDataObjectConsumer or let us know if you need sample code for this. - Or - You disable the grids default ole drop target behavior and then you just handle the ole drop target events of the Control class. You can disable the grid drop target behavoir with [C#] Model.Options.ControllerOptions = Model.Options.ControllerOptions & ~GridControllerOptions.OleDropTarget; Stefan

Live Chat Icon For mobile
Up arrow icon