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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting record in gridgroupingcontrol

Thread ID:





35893 Oct 12,2005 08:26 PM UTC Oct 12,2005 08:57 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On October 12, 2005 08:26 PM UTC

In the TableControlCellDrawn in the gridgroupingcontrol I am trying to draw a custom cell placing multiple images in it. The images drawn are based on values with the datarow associated with the cell being drawn. So using the e.Inner.RowIndex how would I get the Table.Records[WHAT GOES HERE].

Administrator [Syncfusion]
Replied On October 12, 2005 08:49 PM UTC

Nevermind: Table table = e.TableControl.Table; Element el = table.DisplayElements[e.Inner.RowIndex]; Record r = el.ParentRecord;

Administrator [Syncfusion]
Replied On October 12, 2005 08:57 PM UTC

If you want to get the actual record, you can use code like this.
private void gridGroupingControl1_TableControlCellDrawn(object sender, GridTableControlDrawCellEventArgs e)
	GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
	GridRecord record = style.TableCellIdentity.DisplayElement.GetRecord() as GridRecord;
	if(record != null)
If you really want the index, then you can get the record as above, and then call grid.Table.Records.IndexOf(record) to get the index.


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