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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Binding to arraylist and order of the columns

Thread ID:

Created:

Updated:

Platform:

Replies:

22662 Dec 17,2004 05:14 PM UTC Dec 17,2004 10:18 PM UTC WinForms 1
loading
Tags: GridControl
Cheunhui Wang
Asked On December 17, 2004 05:14 PM UTC

Hi: I have an ArrayList i''d like to use as the data source. Each item in the array has six properties: public double DA{get{return _DA;} public double DB{get{return _DB;} ... public double DF{get{return _DF;} I bound the ArrayList to GridDataBoundGrid: (grid_SkewExpiry''s type is GridDataboundGrid, and OptionList is the ArrayList) this.grid_SkewExpiry.DataSource = OptionList; this.grid_SkewExpiry.Show(); after the grid is displayed, the column order turned out to be: DF,DE,DD,DB,DC,DA I''d like the columns display in order of DA,DB,DC,DD,DE,DF I figured I can call Model.Cols.MoveRange multiple times to sort this, but is there a better way to do this? and how does GridDataBoundGrid determine the order of the properties to display? Thanks, Chunhui

Administrator [Syncfusion]
Replied On December 17, 2004 10:18 PM UTC

You can have your ArrayList implement ItypedList. 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. (You may have to create a new collection and add the property descriptors in teh required order.)http://64.78.18.34/Support/Forums/message.aspx?MessageID=9194

CONFIRMATION

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.

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

;