Articles in this section
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

C#: ReorderColumnsInGDBG

VB: ReorderColumnsInGDBG

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied