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.
Unfortunately, activation email could not send to your email. Please try again.

Drag and Drop

Thread ID:

Created:

Updated:

Platform:

Replies:

30352 Jun 16,2005 09:39 AM Jun 16,2005 10:45 AM Windows Forms 1
loading
Tags: GridControl
Steve
Asked On June 16, 2005 09:39 AM

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

Administrator [Syncfusion]
Replied On June 16, 2005 10:45 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;