Hello,
2 years ago, when we were developing using the hierarchical grid component you proposed, I asked this question on the forum: https://www.infragistics.com/community/forums/f/ignite-ui-for-jquery/124259/ighierarchicalgrid-odata-lazy-loading-with-only-necessary-expansion-indicators
I tested the idea that you proposed to me, that is to say that when the grid is loaded, with a "rendered" event, to fold/unfold all the lines. However, in terms of performance, I tested it and it turns out to be catastrophic, the grid takes around 30 to 60 seconds longer to load, which is inconceivable.
Here is the code that I put when creating the hierarchical grid, in the rendered event:
rendered: (evt, ui) => { const allRows = jQuery(".ui-iggrid-tablebody tr") this._jGrid.igHierarchicalGrid("expand", allRows, (index, rows) => { this._jGrid.igHierarchicalGrid("collapse", rows); }); },
Would you have a better idea of how I can hide the indicators without having to redo dozens of queries to find out if the grid has a child or not? For example, is it possible to load the level 2 sub-grids without having to fold/unfold?
Thank you in advance for your response.
Hello Vincent,
Thank you for posting in our community!
I have been looking into your question and what I can say, as my colleague has described in the provided forum thread, is that when the load-on-demand functionality is used, the igHierarchicalGrid does not have information about its children and whether they have any rows. Only the parent data loads initially.
Having this in mind, displaying only part of the expanding indicators and simultaneously using the load-on-demand functionality is not supported. In order to display expanding indicators only for the rows that have child records, the igHierarchicalGrid should have access to all the data.
Here can be found a small sample.
Additionally, if you require not all grid data to be rendered initially, I could suggest using remote paging. More information that I believe you will find helpful can be found in our Paging topic here.
Please let me know if you need any further information regarding the load-on-demand functionality.
Sincerely, Riva Ivanova Software Developer