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

Multiple header and determining data selected data row

Thread ID:





8429 Nov 5,2003 06:21 PM UTC Nov 5,2003 06:54 PM UTC WinForms 1
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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon