Hi,
I'm using WebHierarchicalDataGrid with a parent to man children relationship, I am attempting to maintain expanded rows after a postback and a data rebind. I was successful by setting the InitalDataBindDepth to 1 level (since I only needed the first set of children to display) and then iterrating through the ContainerGridRecords and re-expanding them in the code behind. But with the InitialDataBindDepth to 1, when I attempt to sort the grid, I receive the following error:
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
The grid only has about 300 or so parent records with each having at most 1-3 child records.
Is there a better way to only bind the specific rows's children that I need to be expanded after a refresh from the data source? Instead of needing to bind every row's child?
Thanks,
Pearson
I was able to find a work around that would use the InitialDataBindDepth and set it to 1 for when I needed the expanded state to persist after a post back. To circumvent the issues with Sorting I would just reset the bind depth back to 0 on my sort handler. Also added it to the page handler since it would also cause the same error when attempting to page with a bind depth of 1.