Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
600
WebDataTree loads ENTIRE data hierarchy even though InitialDataBindDepth="0"
posted

(I already made a post today asking how to use parameterized queries for the datasources used by WebHierarchicalDataSource. But now we have a more disturbing issue).

We want to load a fair amount of data in our WebDataTree, and the database tables are very large, so we wanted to use the "Load On Demand" feature of the WebDataTree. We also want to use the convenient and (in theory at least) very cool WebHierarchicalDataSource.

So ... I noticed that the datasources bound to levels 1 and 2 our tree hierarchy were being populated in first-time logic (IsPostBack = false), even though InitialDataBindDepth="0" was set for the WebDataTree. I thought it was something we were doing, but I created a test web project using the AdventureWorks database that was almost identical to the "Load On Demand" sample, except it used the AdventureWorks on SQL Server. I turned on the SQL Server profiler and confirmed that the database was being hit right away. When you click on a level 0 node, the database is hit AGAIN.

So what's the story? Does anyone know? Am I doing something wrong? To me this seems like an out-an-out bug, and makes a joke of the term "Load On Demand".

BillyB

Parents Reply Children
No Data