AD
Administrator
Syncfusion Team
July 22, 2004 01:30 PM UTC
Daniel,
there is a one-to-one relation between rowindex and the Table.DisplayElements collection.
If you have a rowIndex you can get the element that is displayed at that row with
Element el = Table.DisplayElements[rowIndex];
The record the element belongs to will be
Record r = el.ParentRecord;
The record position in the table can then be determined with
int index = Table.Records.IndexOf(r);
or the record position in the underlying source list with
int orginalIndex = Table.UnsortedRecords.IndexOf(r)
BTW - if you have an element and want to know the rowindex it is displayed at you can do this:
int rowIndex = Table.DisplayElements.IndexOf(el);
Stefan