The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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");
ADAdministrator 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?