When I attach a data set to a data bound grid,
the columns order in the grid is derived from the fields order in the data set.
Is there a way I can control\override the columns order at runtime? (without changing the fields order in the data set offcourse...)
Thanks in advance,
ADAdministrator Syncfusion Team May 23, 2004 05:04 AM
You create GridBoundColumn objects for each column you want to see, and add them to the grid.GridBoundColumns collection using grid.GridBoundColumns.Add. The grid should only show the columns in this collection, and in the order that you set them. (For each GridBoundColumn object, make sure you set its MappingName property to the ColumnName for the column in your DataTable. This is how th egrid identifies the columns, and it is case sensitive.)