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 6, 2005 12:00 AM UTC

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 10:36 AM UTC

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 12:18 PM UTC

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

Loader.
Up arrow icon