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

Reordering columns in a databound GridListControl

Thread ID:





26398 Mar 22,2005 05:16 PM UTC Mar 22,2005 06:40 PM UTC WinForms 1
Tags: GridControl
Martin Cyr
Asked On March 22, 2005 05:16 PM UTC

I got a GridList for wich I set the datasource to an arraylist. My question is how can I set the order in wich the columns containing the properties of my custom class are displayed in the gridlist? Something like public class whatEver private strname as string = "Name" private strlastname as string = "Lastname" public property name as string get name=strname end get end property public property lastname as string get lastname=strlastname end get end property end class public class withTheGrid public sub aSub() dim a as new arraylist grdList.beginupdate grdList.dataSource = a a.add(new whatever) a.add(new whatever) grdList.endupdate end sub end class Now I got the info right, but let''s say it prints the name then the lastname, how do I get it to do the opposite.

Administrator [Syncfusion]
Replied On March 22, 2005 06:40 PM UTC

You can control the display order of the properties in your ArrayList objects by having your ArrayList 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.

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

Live Chat Icon For mobile
Live Chat Icon