Column Order in Datagrid

The datagrid automatically arranges the columns in alphabetical order. Is there a way where I can set which column 0, column 1 is rather than displaying the columns in alphabetical order?

1 Reply

CB Clay Burch Syncfusion Team June 11, 2002 07:51 AM UTC

If you create a DataGridTableStyle, and then add DataGridColumnStyles to this tablestyle, the order in which you add the columnstyles will determine the order of display in the datagrid. There's a FAQ entry that discusses this: http://www.syncfusion.com/faq/winforms/search/764.asp Many other FAQs create columnstyles, adding them to a table style to be used in the grid. For example, the checkbox FAQ does this. If you add the styles in a different order, the column order will change also. http://www.syncfusion.com/faq/winforms/search/754.asp

Loader.
Up arrow icon