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

Reordering columns in a GridDataBoundGrid

Thread ID:





7323 Sep 19,2003 11:34 AM UTC Sep 19,2003 03:19 PM UTC WinForms 1
Tags: GridControl
Doug Lind
Asked On September 19, 2003 11:34 AM UTC

Hi, I'm trying to create a UI to allow clients to control some basic column properties (colors, width, hide, and column order). The grid is a GridDataBoundGrid. At this point, I can handle the colors and header text by creating a GridBoundColumns collection fot the grid. Interstingly, width, and hide appear to be part of the Grid.Model, each as a seperate column indexed collection. My assumption is that reordering columns is simply a matter of the order the are added to the GridBoundColumns. The concern is what does this do to the size mappings in the grid model? How do they get remapped to follow the new column order? I've checked out the example at http://www.syncfusion.com/faq/winforms/search/764.asp but it appears to be specific for GridControls. Am I barking up the wrong tree? It seems that I should just be able to create a new bound columns collection, set the properties for each column and apply the collection. Any suggestions or examples would be greatly appreciated. Thanks, Doug Lind Panther Systems

Administrator [Syncfusion]
Replied On September 19, 2003 03:19 PM UTC

If you use the this.gridDataBoundGrid1.Model.Cols.MoveRange method to move you columns (or allow you user to use the default drag column support), then the column sizes should move appropriately without further work.


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