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

Setting Column Order

Thread ID:





15030 Jun 10,2004 08:27 AM UTC Jun 10,2004 09:52 AM UTC WinForms 1
Tags: Grouping
Administrator [Syncfusion]
Asked On June 10, 2004 08:27 AM UTC

I have a grouping grid and bound to a DataSet. What is the easiest way of setting properties for various columns? At the moment I''ve got: grid.TableDescriptor.Columns["MyColumn"].HeaderText = "My Column"; grid.TableDescriptor.Columns["MyColumn"].Width = 40; and so on. I was want to adjust the order of columns, the only way I can see of doing this is to use grid.TableDescriptor.Move which requires column indexes. Thanks, Ben.

Administrator [Syncfusion]
Replied On June 10, 2004 09:52 AM UTC

Hi Ben, there are multiple ways to rearrange columns: The column order can be modified by adding columns in the the order you want them to appear to the GridTableDescriptor.VisibleColumns collection. Example: this.groupingGrid1.TableDescriptor.VisibleColumns.Add("CustomerID"); this.groupingGrid1.TableDescriptor.VisibleColumns.Add("CompanyName"); Or you could also add them in the order you want them to appear to the GridTableDescriptor.Columns collection (see the CategoryView example). The designer also lets you modify the order of columns through collection editors when you click on the ellipsis button of the "Columns" or "VisibleColumns" collection. The "Preview and Edit" mode in design time also lets you drag columns around. Stefan


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