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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change column order

Thread ID:





14251 May 23,2004 09:06 AM UTC May 23,2004 10:04 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On May 23, 2004 09:06 AM UTC

Hello, 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, Gil K

Administrator [Syncfusion]
Replied On May 23, 2004 10:04 AM UTC

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.)


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon