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.
Unfortunately, activation email could not send to your email. Please try again.

How do I bind only few properties of my object in GridListControl

Thread ID:





3175 Mar 6,2003 12:57 PM Mar 6,2003 03:18 PM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On March 6, 2003 12:57 PM

Hi, I have an ArrayList of CustomerDetails objects. CustomerDetails object has about 15 properties. I am using a ComboBoxExt and setting the GridList control as the ListControl for my combobox. By Setting Datasource = myCustomerList it displays all the 15 columns. How do I bind only 4 Properties (say Name, City, State and Zip) to my GridListControl, so that it does not display all the columns? Also, how do I change the default order of the columns in my GridListControl? Currently it is displaying the order in which the properties appear in my code, which is not user friendly. thanks, - Reddy

Administrator [Syncfusion]
Replied On March 6, 2003 03:18 PM

There are no properties that you can set to accomplish the task of controlling the order and number of columns in a GridListControl. But it is straight-forward to manage this through two events on the embedded GridControl which is a member of the GridListControl. In a QueryColCount handler, you can specify the number of columns that you want to see. In a QueryCellInfo handler, you can specify what property appears in what column. There is a sample project attached showing how you might go about this.


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.

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.