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.

Finding value in named column via rowindex in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

31344 Jul 5,2005 07:51 PM Jul 6,2005 08:18 AM Windows Forms 3
loading
Tags: GridControl
Damien Sawyer
Asked On July 5, 2005 07:51 PM

Hello, I am using the GridGroupingControl and am catching a button press with the TableControlPushButtonClick event. Could someone please tell me how, given the name of a column, I find the value of that column in the row the user has clicked on? The grid will be grouped/sorted etc.. I''ve had a look at a few ways of doing it but resign to the reality that I''m on the wrong track. Thanks very much in advance, Damien Sawyer

Administrator [Syncfusion]
Replied On July 5, 2005 08:00 PM

Here is one way you can do this.
private void gridGroupingControl1_TableControlPushButtonClick(object sender, GridTableControlCellPushButtonClickEventArgs e)
{
	GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
	if(style.TableCellIdentity.DisplayElement is GridRecordRow)
	{
		GridRecordRow rec = style.TableCellIdentity.DisplayElement as GridRecordRow;
		Console.WriteLine(rec.ParentRecord.GetValue("Col1"));
	}
}
 

Sharad Sharma
Replied On July 6, 2005 06:36 AM

Hi Clay Burch, I am working in GidgroupingControl which event is fired if we click on the row having[+] button at left (of the parent row) Thanks Sharad [Kapil] >Here is one way you can do this. >
>private void gridGroupingControl1_TableControlPushButtonClick(object sender, GridTableControlCellPushButtonClickEventArgs e)
>{
>	GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
>	if(style.TableCellIdentity.DisplayElement is GridRecordRow)
>	{
>		GridRecordRow rec = style.TableCellIdentity.DisplayElement as GridRecordRow;
>		Console.WriteLine(rec.ParentRecord.GetValue("Col1"));
>	}
>}
> 

Administrator [Syncfusion]
Replied On July 6, 2005 08:18 AM

If you are using nested tables, then there are this.gridGroupingControl1.RecordExpanding this.gridGroupingControl1.RecordExpanded this.gridGroupingControl1.RecordCollapsing this.gridGroupingControl1.RecordCollapsed events.

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.

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.

;