We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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 11:12 AM

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.
Live Chat Icon For mobile
Up arrow icon