I've uploaded a new updated version of the EditableHierarGridDemo that shows how to edit rows in the parent grid, the child grid and furthermore how paging and sorting in the child grid works.
A basic principle for this to work is that the child saves its DataSource to the session (or somewhere else) as you can see in the DataBinding event of the child template. Please note that this DataSet is not identical to the DataSet of the parent grid but is a clone that contains only the subset of data that is relevant for the child.
Example:Authors=>Titles - The main dataset contains five authors and each author has 3 titles. When the HierarGrid is rendered for each author one title template is created. When this child template is called, the DataSet only contains the three titles of the current author (and not all titles and not any authors). In my sample this DataSet is persisted in the Session so that after postbacks in the child grid occur, only the specific grid can be rebound.
To further clarify that, set a breakpoint into the DataBinding event of the child template and open a quickwatch on the DataSet. You'll notice that only ths correct subset of the data is contained.
Download the demo here: http://www.denisbauer.com/ASPNETControls/HierarGrid.aspx
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2008, Denis Bauer