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 do I bind only few properties of my object in GridListControl

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

1 Reply

AD Administrator Syncfusion Team March 6, 2003 08:18 PM UTC

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.

Loader.
Live Chat Icon For mobile
Up arrow icon