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

Accessing value and celltype of nested table

Thread ID:





74630 Jun 23,2008 04:59 PM UTC Jun 25,2008 12:52 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On June 23, 2008 04:59 PM UTC


I am using a grid grouping control that contains nested tables. I'm looking for a way to access specific cells of the sub table outside of the querycellstyleinfo event.

Here is my grid setup:

I have to source tables Customer and Location.
Customer is the main table, and Location is the sub table.
Customer has a customerID field, Location contains customerId, locationDescription, and address.
They are related by a customerID in both tables.
Address is a dropdown field.

//Set Data source to dataset because grid displays a multiple table hierarchy
//set datamember to top level table
customerGrid.DataSource = customerDataSet;
customerGrid.DataMember = "Customer";

//set up relation between the Customer and Location tables
GridRelationDescriptor rdCustomerToLocation = new GridRelationDescriptor();
rdCustomerToLocation.Name = "rdCustomerToLocation";
rdCustomerToLocation.RelationKind = RelationKind.RelatedMasterDetails;
rdCustomerToLocation.ChildTableName = "Location"; //Link to Location table

//link tables on level column values
rdCustomerToLocation.RelationKeys.Add("customerID", "customerID");

//set columns to be visible in child table

//Add the relation to the Customer table descriptior

//add relation to Locations table to Customers table

If I wanted to for example change the dropdown datasource of the adress field of customer 42, location description Alberta outside of an event how would I do that?
Is there a way to uniquily identify a specific cell in a nested table in the grid, like an index I can use?
I was able to access the cells in the main Customer table, but not the nested Location table.

Sri Rajan [Syncfusion]
Replied On June 25, 2008 12:52 PM UTC

Hi Nikesh,

Thank you for your interest in Syncfusion products.

You need to handle TableControlCurrentCellShowingDropDown event to change the datasource of the combobox(in Parent and child table) dynamically. Please refer the below code.

void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, GridTableControlCurrentCellShowingDropDownEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if (cr != null)
((GridComboBoxListBoxPart)cr.ListBoxPart).DataSource = list2;

If you want to change the datasource of the child table dynamically based on the value of another cell. Then that can be achieved through QueryCellInfo.

Please refer the below forum:

Please let me know if this helps.

Best Regards,


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

or the page will be automatically redirected to 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