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.

GridListControl column order

Thread ID:





33350 Aug 18,2005 05:05 AM Aug 18,2005 06:14 AM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On August 18, 2005 05:05 AM

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?

Administrator [Syncfusion]
Replied On August 18, 2005 06:14 AM

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.


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.