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");