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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag And Drop Rows in Grid Grouping Control

Thread ID:





83799 Jun 27,2009 08:43 AM UTC Jul 1,2009 09:44 AM UTC WinForms 1
Tags: GridControl
Rohit Kumar
Asked On June 27, 2009 08:43 AM UTC

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

Lingaraj S [Syncfusion]
Replied On 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:

Please let me know if you have any queries.

Lingaraj S.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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