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.
Unfortunately, activation email could not send to your email. Please try again.

Multiple header and determining data selected data row

Thread ID:





8429 Nov 5,2003 01:21 PM Nov 5,2003 01:54 PM Windows Forms 1
Tags: GridControl
Brian Bacon
Asked On November 5, 2003 01:21 PM

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

Administrator [Syncfusion]
Replied On November 5, 2003 01:54 PM

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.