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.

Gridgroupingcontrol child table values from grandchild table

Thread ID:





14058 May 17,2004 01:47 PM May 18,2004 08:19 AM Windows Forms 2
Tags: GridControl
Asked On May 17, 2004 01:47 PM

In the QueryCellStyleInfo event of a gridgroupingcontrol, I need to disable/enable certain cells in a grandchild level (3rd level) table based on the ChildTable parent value (2nd level). i.e., from the grandchild level, I need to pull info from the CHILD level table (not the top-most level parent). How would you retrieve the childtable parent record information from a grandchild level table (in VB.net)? Thanks, Robert

Administrator [Syncfusion]
Replied On May 18, 2004 01:18 AM

Here is one way you can get at the child table from within the grandchild table.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
	GridTable table = this.gridGroupingControl1.GetTable("GrandChildTable");
	if(table != null && table.Equals(e.TableCellIdentity.Table) 
		&& e.TableCellIdentity.DisplayElement is GridRecordRow
		&& e.TableCellIdentity.DisplayElement.Kind != DisplayElementKind.AddNewRecord
		GridRecord rec = e.TableCellIdentity.DisplayElement.ParentChildTable.ParentNestedTable.ParentRecord as GridRecord;
		DataRowView drv = rec.GetData() as DataRowView;
		Console.WriteLine(drv["Name"].ToString() + "  " + drv["childID"].ToString()); //some values

Replied On May 18, 2004 08:19 AM

perfect!! Thanks Clay.


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.