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

Interchange the row values and not the rows on drag drop event.

Hi,

I just want to interchange the row values and not to re-order the rows on a normal drag drop event.

My concern is as under(user acts as):
1. User starts draging a row(Though the row should NOT chnage it's position)
2. User drops selected row on some another row.
3. some context menu to be shown as soon as or before the drop is complete.
4. Depending upon the menu selection the values either should be replaced with each other or should be recaluated and updated to the rows in grid.

Thanks in advance.

1 Reply

AD Administrator Syncfusion Team March 27, 2007 01:11 PM UTC

There is another current thread that is discussing something similar at http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=49716.

Here is a sample (based on the sample from the other thread) that does basically what you asked about. It allows you to mousedown on a row and drag it to another row. When the drag is released, it replaces the new row with values from the initial row. In the DragDrop code, you could instead display your menu and do whatever you want done at the drop.

It makes use of the Windows Forms Drag Drop support, but does not actually put the dragged item into the event args. Since, the dragging is taking place within the same grid, it just uses a variable to hold the dragged Record. This simplifies things a little.

http://www.syncfusion.com/Support/user/uploads/CellDragDrop_899f429b.zip

Loader.
Live Chat Icon For mobile
Up arrow icon