Drag and Drop

Highlight a 2x2 range of cells in a grid and begin a drag and drop operation. Notice that the target rectangle is 2x2, which does not change when attempting to drag above row 1, but when dragging to the bottom of the grid the rectangle actually becomes a 1x2 when moving the mouse beyond the last row. Dropping does indeed fill the full 2x2 rectangle instead of the 1x2 rectangle shown. How can I preserve the full rectangle when dragging to the bottom of the grid? Thanks, Steve

1 Reply

AD Administrator Syncfusion Team June 16, 2005 02:45 PM UTC

I do not know of a simple way to do this. The grid by default will actually try to append rows and columns so the drop will fully take place and the offscreen rectangle is the actual target (as new rows/columns are added). If you have the source code, you can try creating your own dataobject that implements IGridDataObjectConsumer, and register this object with RegisterDataObjectConsumer that tells the grid to check for your dataobject in its OLE D&D.If you have teh source code, you could try copying our GridTextDataObjectConsumer class code into your class, and directly tweaking the code to accomplish what you want. Another option would be to turn off our D&D support and do things yourself. You would have to draw your target frame and this would again take some effect. If you want to pursue either of these options, and you need more help, submit a Direct Trac support incident and we can try to provide it.

Loader.
Up arrow icon