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.
Unfortunately, activation email could not send to your email. Please try again.

GridDataBoundGrid column order

Thread ID:





10098 Jan 22,2004 04:49 AM Jan 22,2004 07:59 AM Windows Forms 1
Tags: GridControl
David Nagelhout
Asked On January 22, 2004 04:49 AM

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"; return cust; } 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? Thanks, David

Administrator [Syncfusion]
Replied On 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.


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.

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.