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

Child row not expanding

In my GridBoundDataGrid, the first time my grid displays everything works great within the child row. But I''ve got a toggle button that displays the grid in a different mode. When I click on the toggle button again, it should return the grid to the original functionality, but even though I''m calling the same code, my child row will not expand again. Is there something with the relationship I need to set so that the same code can display the child row over again? Below is how I''m setting up my relationship. Thanks, Steve DataSet ds = new DataSet(); this.dtChild.TableName = "child"; ds.Tables.AddRange(new DataTable[]{dtParent, dtChild}); DataRelation parentToChild = new DataRelation("ParentToChild", dtParent.Columns["key_no"], this.dtChild.Columns["key_no"]); ds.Relations.AddRange(new DataRelation[]{parentToChild}); this.dgMyGrid.DataSource = ds; this.dgMyGrid.DataMember = dtParent.TableName; GridHierarchyLevel level = this.dgMyGrid.Binder.RootHierarchyLevel; level.LayoutColumns(layoutItems); GridHierarchyLevel level2 = this.dgMyGrid.Binder.AddRelation("ParentToChild");

1 Reply

AD Administrator Syncfusion Team December 14, 2004 08:10 PM UTC

You might try calling grid.Binder.ResetHierarchyLevels to see if that helps. But what are you doing now in your toggle button when you turn the hierarchies off, and what are you doing now when you try to turn the hierarchies back on?

Live Chat Icon For mobile
Up arrow icon