Hello,
I have a WHDG set up with one additional band. The grid has to be completely expanded on page load, so the InitialExpandDepth is set to -1. This works, however, the performance is desastrous. With about 40 parent rows and about 3 childrows each, I have to wait several seconds until the grid finally shows up.
If I set InitialExpandDepth to 0, the grid appears immediately, and I found out that the expansion of the parent rows actually happens in the browser, even though the HTML that is sent to the browser could already be fully expanded - since I already chose to expand everything on server side. I also tried to set the expanded state in the OnDataBound-event (grid.GridView.Rows[0].Expanded = true), but same result.
Questions:
1. Is there any way to have the rows in the rendered HTML expanded from start?
2. If not, is there a workaround to speed up the expansion (maybe beginUpdate/endUpdate surrounding the expansion process? I don't know where to hook in there)?
Hi,
Where did you see that the expansion of the parent rows happens in the browser? It happens through an ajax postback which then does full selects of the datasource and then filters out the couple of records you need. That's why it takes so long. If you set the initialdatabinddepth to -1, then you would have everything in the client, but you would see the same poor performance.
There's a way to select just the records you need for that page with manual load on demand, but it's a job to set up. Then you could set the initialexpanddepth to -1 and it should work nicely.
Ed
To clarify my situation:
I have alread set the InitialDataBindDepth="-1" , so that all data is already in the Browser. Then, because of InitialExpandDepth="-1", all rows are expanded - without a postback. I verified that no postback is performed, because otherwise my breakpoint in the Page_Load method would be hit.
So my problem ist not the binding or retrieval of data, but the javascript performance of the row expansion. If the rendered HTML would be in the expanded state from the beginning, the expansion afterwards would not be necessary.
Does anyone else could help with this issue? Infragistics staff, maybe?
Hello tomek2k1,
Did you have a chance to look at the attached sample? Let me know if you have any questions or issues with it.
Thanks!
Hi Tomek,
Did you have any solution to speed up the expand child band from WebHierarchicalDataGrid at client side?
I also have this issue now and your help is very helpful.
Thanks,
Nguyen Huu Chu
Hello Rado,
I have looked at your sample.
Performance of your sample is ok. To render 20 items with 10 items inside each parent item tooks about 2 seconds.
If I add one item inside each child item of the 10 items it takes about 15 seconds. Thats to long. I have measured the rendering time of the WHDG.
My hierarchy looks like following:
Parent1 -> Child1 -> Child1ofChild1 -> Child2 -> Child1ofChild2 -> Child3 -> Child1ofChild3 ...Parent2 -> Child1 -> Child1ofChild1 -> Child2 -> Child1ofChild2 -> Child3 -> Child1ofChild3
...
I have 20 parents, 10 childs for each parent and 1 child for each child.Is there any possibility to speed up the rendering without set InitialDataBindDept to > -1?
Tomek