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

TableControlCellDoubleClick Event - value from parent group?

Thread ID:





29855 Jun 4,2005 05:09 AM UTC Jun 4,2005 10:56 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On June 4, 2005 05:09 AM UTC

I''ve got a GridGroupingControl bound to a hierarchical dataset. There are 3 group levels. I''ll call them levels 1, 2, and 3, where level 1 is the top level, and level 3 is the bottom level. When a user double-clicks a row in the last group (level 3), how do I obtain the current value from the corresponding parent group (level 2)? Thanks, s.s. P.S. Is there a KB article or other documentation that provides an overview of the object hierarchy in a grid grouping control? I keep getting confused when trying to traverse it. Just when I think I know what TableControl.Table.CurrentElement.ParentElement is supposed to return, I find out I''m wrong again!

Administrator [Syncfusion]
Replied On June 4, 2005 10:56 AM UTC

To get the record from the parent node of the double click cell, try:
private void gridGroupingControl1_TableControlCurrentCellControlDoubleClick(object sender, GridTableControlControlEventArgs e)
	GridCurrentCell cc = e.TableControl.CurrentCell;
	GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex];
	GridRecord rec = style.TableCellIdentity.DisplayElement.ParentTable.CurrentRecord as GridRecord;
	if(rec != null)
		object o = rec.GetData();//retrieves the object in the row 
		//if you are using DataTables, you can cast it to a DataView
		Console.WriteLine(((DataRowView)o)[1]); // 2nd col in dataview


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