Category / Section
How to reorder the column in GridDataBoundGrid?
1 min read
To rearrange the columns of the GridDataBoundGrid, use the Binder.LayoutColumns(). You can choose the order of the column to be displayed in the Grid by using the LayoutColumns() method.
C#
//Reorder the Column of the Grid this.gridDataBoundGrid2.Binder.LayoutColumns("City", "Id", "Name", "WorkingBranch"); //Specify the column index this.gridDataBoundGrid1.Model.Cols.MoveRange(1, 2);
VB
'Reorder the Column of the Grid Me.gridDataBoundGrid2.Binder.LayoutColumns("City", "Id", "Name", "WorkingBranch") 'Specify the column index Me.gridDataBoundGrid1.Model.Cols.MoveRange(1, 2)
Figure 1: Rearranged the columns in Grid
Sample Link