The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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.