The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team 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