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.
Syncfusion Feedback

Multiple header and determining data selected data row

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 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
}

CONFIRMATION

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.

Warning Icon 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.Close Icon

;