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

Finding value in named column via rowindex in GridGroupingControl

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

3 Replies

AD Administrator Syncfusion Team July 5, 2005 07: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"));
	}
}

            


SS Sharad Sharma July 6, 2005 05: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"));
>	}
>}
>
            


AD Administrator Syncfusion Team July 6, 2005 07:18 AM

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

Loader.
Live Chat Icon For mobile
Up arrow icon