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

Drap and Drop

Hello, Does anyone know of the best way to implement drag and drop within a GridControl? I would simply like to drag a control from one cell to another. Thanks, Dennis

1 Reply

AD Administrator Syncfusion Team October 19, 2004 03:15 PM UTC

If you want to drag text (both GridControl & GridDataBoundGrid) or style information (GridControl only), this is supported by just setting grid.AllowDrop = true. Then you can select a range of cels, put your mouse on teh border of the selections, an dthen mousedown and drag the contents to another position in the grid. Now if you want to do some other type of dragging, there are several ways to go about it. One is to turn off the grid''s OLE D&D support, and just use the standard Windows Forms drag events to manage things. If you want to try to work within the grid''s D&D support, then you can handle the QueryOleDataSourceData that is called when a drag is started. There you can add your own data to the e.DataObject. Then handling the grid.DragDrop event will allow you to catch teh drop to handle things there.

Live Chat Icon For mobile
Up arrow icon