문제

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