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
close icon

How to set columns in GridListControl

I have a GridListControl on a form that I''m filling with data by setting its DataSource property to that of a strongly-typed custom collection. Every public member of the class that the objects in the collection are has a column automatically created for it when I do this. How do I tell the grid to only show columns for certain class members when binding a collection of objects to a GridListControl?

4 Replies

AD Administrator Syncfusion Team May 24, 2005 09:47 PM UTC

You can hide a particular column in a GridListControl with code like: //hide the first column this.gridListControl1.Grid.Cols.Hidden[1] = true;

AD Administrator Syncfusion Team May 25, 2005 01:59 PM UTC

Is there any way to arrange the order of columns when you have a strongly-typed collection as the DataSource for a GridListControl? The order in which the class members are bound the columns appears to be completely arbitrary.

AD Administrator Syncfusion Team May 25, 2005 03:08 PM UTC

Have your objects implement ITypedList. The order of the property descriptors determin the column order. Here is a forum thread that starts discussing this about mid way through. It has a link to another thread that has an ITypedList example. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=23993

AD Administrator Syncfusion Team May 25, 2005 03:16 PM UTC

Thank you very much. This looks to be exactly what I am aiming for.

Live Chat Icon For mobile
Up arrow icon