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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set columns in GridListControl

Thread ID:





29393 May 24,2005 07:09 PM UTC May 25,2005 03:16 PM UTC WinForms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On May 24, 2005 07:09 PM UTC

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?

Administrator [Syncfusion]
Replied On 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;

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On May 25, 2005 03:16 PM UTC

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


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