I'm probably overlooking something, but I can't seem to fetch the first row of an UltraCombo after sorting. A row is returned, but it's not the first one.
I'm sorting like this:
machineCodeUltraCombo.DisplayLayout.Bands[0].SortedColumns.RefreshSort(
false);
after that, I tried some different ways of getting the first displayed row:
firstRow = machineCodeUltraCombo.Rows.SingleOrDefault(r => r.VisibleIndex == 0);
firstRow = machineCodeUltraCombo.Rows[0];
firstRow = machineCodeUltraCombo.DisplayLayout.Rows[0];
firstRow = machineCodeUltraCombo.DisplayLayout.Rows.GetRowAtVisibleIndex(0);
All these options return the same (wrong) row.
First you should add the columns to the sorted columns collection, like
machineCodeUltraCombo.DisplayLayout.Bands[0].SortedColumns.Add("desired column", flag indicator for ascending or descending", Groupby flag);
And than you could take the FirstRow like:
About the following line it would refresh the already sorted columns.
Please let me know if you have any further questions about this issue.
Stefaniya,
Developer Support Engineer
Infragistics
www.infragistics.com/support