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

Multiple header and determining data selected data row

I'm using a data bound grid. I have three header rows. Each group of rows that represent a record has an ID in the first column. When my users double click on any cell in the grid I want to retrieve the ID for that row group. Thanks

1 Reply

AD Administrator Syncfusion Team November 5, 2003 06:54 PM UTC

So, is every 3 rows in the grid mapped to a single datasource record (as in our multirowrecord sample)? If so, given a rowindex, you can get the record position using GridBoundRecordState rs = grid.Binder.GetRecordStateAtRowIndex(rowIndex); int recPos = rs.Position; To get the rowindex, you can catch the CurrentCellControlDoubleClick and use code like this to find the rowindex.
int rowIndex, colIndex;
Point pt = this.grid.PointToClient(Control.MousePosition);
if(this.grid.PointToRowCol(pt, out rowIndex, out colIndex, -1))
{
      //rowindex has the row
}

Loader.
Up arrow icon