Is there an example of binding the WebHierarchicalDataGrid to a Dataset at runtime?
The dataset would contain multiple tables with relations.
Thanks for any help.
Hello,
This sample shows how to bind the grid to a dataset. I know it does not show how the data set was actually created, but that should not be a problem, I'd imagine.
Is there any particular problem you are facing?
Thanks. I've seen that sample.
I've bound the dataset to the grid, but I'm getting an error alert when I try to expand a parent row:
"Runtime Exception: No child grid script descriptors are available!"
I'm manually setting the primary key on each table in the dataset. I'm then setting the relations in the dataset. The grid is set to autogenerate columns and bands. InitialDataBindDepth is set to 0. Is there something else I'm missing?
To fix the previous error, I needed to set the dataset to rebind after each postback.
But now I am getting a script error each time on the second attempt to expand a parent row. The first expansion attempt always works, on any row. But the second expansion attempt (parent row) always fails with the error:
"Microsoft JScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON. Parameter name: data"
Iwoodell,
I'm using a WHDG and a WebHierchicalDataSource. The two DataViews are pointed to two datatables.
Sometimes on a postback, I want to refresh the WHDG. I refresh the two datatables, but when I try to rebind the WHDG, I either get a "Dataview does not have a DataSourceId" error or my grid is empty.
Could you share your code for rebinding the WHDG to fresh data on a postback?
Thx,
Charles
Charles,
I ended up going back to the UltraWebGrid, as the WDHG did not lend itself to the amount of customization I required. Unfortunately, I no longer have the WDHG code, as it was an experiment on my part.
But...try clearing the the WDHG (table, columns, rows) before rebinding.
Lile