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
close icon

showing hierarchical GridDataboundGrid

Hi, I'm trying to create a hierarchical griddataboundgrid within which a user can expand and collapse nested relations. In the 'Essential Grid's User Guide' it says that one 'needs to just set the grid's data source to an ADO.NET DataTable of DataView with a foreign key and a relation. I've tried and I've tried but I cannot seem to create the right code. Could you gimme an example of how to do this? Please see the attachment to see the code I have till now. Thnx in advance. marco

1 Reply

AD Administrator Syncfusion Team June 20, 2003 06:29 AM UTC

Try this code.
private void test_Load(object sender, System.EventArgs e)
{
	DataSet d = ds();
	this.gridDataBoundGrid1.DataSource = d.Tables["Customers"];	
	GridHierarchyLevel childrenLevel = this.gridDataBoundGrid1.Binder.AddRelation("CustomerQ");
}
You can see sample usage in the three samples that you can find in this folder: \Program Files\Syncfusion\Essential Suite\Grid\Samples\DataBound\Hierarchical

Loader.
Live Chat Icon For mobile
Up arrow icon