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

GridListControl column order

I have the following code: style = Me.GridModel.ColStyles(3) Dim mydatasrc As IList(Of MyDataObject) = New List(Of MyDataObject) mydatasrc.Add(New MyDataObject("Obj1_P1", "Obj1_P2", 4)) mydatasrc.Add(New MyDataObject("Obj2_P1", "Obj2_P2", 1)) mydatasrc.Add(New MyDataObject("Obj3_P1", "Obj3_P2", 2)) style.DataSource = mydatasrc style.DisplayMember = "Prop2" style.ValueMember = "Prop1" The column order in the dropdown list is "Prop2", "Prop1". Can I somehow customize it, so I get "Prop1", "Prop2" column order?

1 Reply

AD Administrator Syncfusion Team August 18, 2005 10:14 AM UTC

You can control the display order of the properties in your IList by having your IList implement ITypedList. Here is a forum thread that has sample code. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9194 In the GetItemsProperties, get the default property order using the techinque shown in this forum thread. But before returning the collection, reorder the colection to the order you prefer.

Loader.
Live Chat Icon For mobile
Up arrow icon