質問

I am using an UltraGrid control from Infragistics. I am able to get a strongly typed enumeration of the UltraGridColumns using the below code:

(this.grid.DisplayLayout.Bands[0].Columns).Cast<UltraGridColumn>();

How can I order this enumeration such that it is the same as in the UI? (The user is able to rearrange columns freely).

Is there a property that I can use to order by or use to sort on?

役に立ちましたか?

解決

The order is in the headers (yeah...):

this.grid.DisplayLayout.Bands[0].Columns).Cast<UltraGridColumn>()
    .OrderBy(c => c.Header.VisiblePosition);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top