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

Drag And Drop Rows in Grid Grouping Control

Dear sir ,
Kindly tell me how to implement drag and drop of rows in Grid Grouping Control using C# Windows.

1 Reply

LS Lingaraj S Syncfusion Team July 1, 2009 09:44 AM UTC

Hi Rohit,

Thank you for your interest in Syncfusion product.

In a GridGrouping Control, the grid just displays the rows as they are presented to it by the underlying datasource. So, if you want to move the position of the rows currently, you have to do so by moving them in the underlying datasource.

One way of doing it is to add an additional column to the datatable that holds a sortKey that reflects where you want the rows to be. You don't display this column ( you can just hide it in the grid as the sample does). When you initially set the DataSource to the grid, you sort the datatable on this column using its defaultview.sort property. Then when you want to move rows, all you have to do is to move the sortKey values and the rows will rearrange themselves (as they must maintain the sort order).

Please refer the following forum thread for more details about the row changing in GridGroupingControl:
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=73068

Please let me know if you have any queries.

Regards,
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon