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.

Converted rowindex to bound data row index for nested table

Thread ID:





51880 Nov 15,2006 04:17 PM Nov 15,2006 11:14 PM Windows Forms 1
Tags: GridControl
Gary Hsu
Asked On November 15, 2006 04:17 PM


I have multiple DataTables bound to GGC to show nested tables.

In the _CellButtonClicked() event, there is a e.RowIndex parameter. This row index appears to be based on the current state of the grid UI, which can change if for example, a nested table above the row in question is expanded.

How do you convert this e.RowIndex to a data row index which can be used to retrieve reference to the corresponding bound data row?

e.g. TableControl.Table.Records[dataRowIndex]

Thank you!

Administrator [Syncfusion]
Replied On November 15, 2006 11:14 PM

Hi Gah,

Below code snippet shows you how to get the recordindex if the rowindex is known.

// Recordindex is being calculated.
GridTable table = e.TableCellIdentity.Table;
Element el = table.DisplayElements[RowIndex];
Record r = el.ParentRecord;
int RecordIndex= table.UnsortedRecords.IndexOf(r);

Best Regards,


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.