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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dragging and dropping covered ranges

Thread ID:

Created:

Updated:

Platform:

Replies:

37977 Dec 3,2005 02:40 AM UTC Dec 4,2005 10:41 AM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 3, 2005 02:40 AM UTC

Right now, by default (at least in grid pad), if you have a covered range of cells and start a drag, the grid only considers the top-left cell as part of the drag and thus only the top-left cell is moved. This makes things inconvenient for cells with images, for example, because you want to spread an image over several cells, but every time you drag the covered range, the destination is not covered and the image is squished in to one cell. How would I implement drag-drop of covered ranges in a way similar to excel? That is, when you start a drag of a covered range, the whole range is dragged and after the drop, the resulting range is also covered. In essence, you are moving the covered range around.

Administrator [Syncfusion]
Replied On December 4, 2005 10:41 AM UTC

If you are dragging within the same grid, you can use class members to communicate the information needed to handle this. One way to do this is to handle the QueryOleDataSource event and there save the covered range as a GridData object and also save the original location. Then in the DragDrop event, you can put this GridData object at its new location. Here is a minimal sample that shows how you can go about this. http://www.syncfusion.com/Support/user/uploads/GC_DragCoveredRanges_bb92e5bf.zip If you want to do this across GridControls, then the idea would be the same, but you would have to use OLE dataobjects to communicate the required objects between QueryOleDataSource in teh source grid and DragDrop in the target grid.

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.

Warning Icon 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.Close Icon

;