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

Converted rowindex to bound data row index for nested table

Thread ID:

Created:

Updated:

Platform:

Replies:

51880 Nov 15,2006 09:17 PM UTC Nov 16,2006 04:14 AM UTC Windows Forms 1
loading
Tags: GridControl
Gary Hsu
Asked On November 15, 2006 09:17 PM UTC

Hello,

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 16, 2006 04:14 AM UTC

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,
Haneef

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

;