I''m fairly new to grid controls and I''m having a hard time getting the DataBoundGrid to display the columns in design-time order. I want the colunns to be arrainged in the same order as they are entered. I''ve created an app simialar to a Syncfusion sample that uses the "Customer" class. My Customer info is:
private static Customer ReadCustomer1()
Customer cust = new Customer("314-09");
cust.Source = "Loc 1";
cust.For = "Loc 5";
cust.PartNum = "1005";
cust.NounDescription = "An Item of Supply";
However, when the grid displays the column order is: ID, NounDescription, For, PartNum, Source.
How can I set the order to be: ID, Source, For, PartNum, Description?
ADAdministrator Syncfusion Team January 22, 2004 07:59 AM
If this is a flat grid, then you would create a GridBoundColumn for each column you want to see, and then add this column to the grid.GridBoundColumns collection. The order the GridBoundColumns are added will determine the order in which you see them. (If you are using the 2010 beta, there was a bug that reset this order. You should get the 2021 beta.)
If this is a hierarchical grid, then there is a hlCategory_Products.LayoutColumns property that you can use to contol the order of things. Take a look at the Syncfusion\Essential Suite\Grid\Samples\DataBound\Hierarchical\ExpandGrid sample.