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

Change Columns and thier Orders according predifined settings

I have a form with GridGroupingControl. I populate the grid with bounding its datasource to a table with all columns data(fetched by SELECT * FROM table). so the grid displays all fields( columns) with default fields order from database. What I want to do is: After the grid displayed all fields, I wnat to allow user to pickup any fields and orders(I created a fields pickup form), the grid will display only selected fields in selected order. In other words, How to change display columns and orders without re-retrieve data ? Any idea or samples? regards, Lan

2 Replies

AD Administrator Syncfusion Team May 26, 2005 03:25 PM

The order in which the columns are displayed is determined by the TableScriptor.VisibleColumns collection. So, you need to add columns to this collection in teh order you want to see them. This will dertermine the order of teh column in the grid. Check out the CategoryView example. It shows how you can save and load the layout schema of a GridGroupingCOntrol as a XML file. Here is also a forum thread on how to extend this if you need to do so. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17634


LM Lan Mo May 30, 2005 08:13 AM

Thanks, I got my code work well now. >The order in which the columns are displayed is determined by the TableScriptor.VisibleColumns collection. So, you need to add columns to this collection in teh order you want to see them. This will dertermine the order of teh column in the grid. > >Check out the CategoryView example. It shows how you can save and load the layout schema of a GridGroupingCOntrol as a XML file. > >Here is also a forum thread on how to extend this if you need to do so. > >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17634 >

Loader.
Live Chat Icon For mobile
Up arrow icon