RowIndexToListManagerPosition() with heirarchical data

I have a heirarchical DataSet I have bound to a GridDataBoundGrid. When the user clicks on a cell I need to know which absolute row was clicked on in the DataSet. I am using RowIndexToListManagerPosition() per a previous posting, but it always returns 0 (zero). The docs seem to suggest that this function only works for the root DataTable and not for the children. If this is correct, is there a different way to do this? Tx, curt

1 Reply

AD Administrator Syncfusion Team April 2, 2003 04:12 PM UTC

Try getting the ListManager in the RecordState for the row.
GridCurrentCell cc = this.gridDataBoundGrid4.CurrentCell;

GridBoundRecordState rs = this.gridDataBoundGrid4.Binder.GetRecordStateAtRowIndex(cc.RowIndex);
DataRowView drv = (DataRowView) rs.ListManager.Current;
DataRow dr = drv.Row;
Console.WriteLine(dr[0].ToString() + "  " + dr[1].ToString() + "  " +  dr[2].ToString());

Loader.
Up arrow icon