Home › Forums › WinForms controls › Xceed Grid for WinForms › CurrencyManager? › Reply To: CurrencyManager?
If I understand you correctly, you have a mechanism to reorder the DataRows by sorting on a (hidden?) column.
You can’t use the <b>Index</b> property of the DataRow, because that’s not the visible index: it never changes. Try this:<code>Grid1.BeginInit()
Dim rows As Xceed.Grid.Collections.ReadOnlyDataRowList = Grid1.<b>GetSortedDataRows</b>(True)
<i>’ rows is a list of the sorted DataRows</i>
For i As Int32 = 0 To rows.Count – 1
rows.Item(i).Cells(5).Value = i
Next
Grid1.EndInit()</code>
Imported from legacy forums. Posted by Tommy (had 3447 views)