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
1415
Issue with igx-tree grid load-on demand
posted

Hi,

I'm using a igx-tree-grid with the load on demand for sub grids as stated in the demo:

https://es.infragistics.com/products/ignite-ui-angular/angular/components/treegrid/load_on_demand.html

We have combination of search parameters and button and igx-tree-grid. On click of button, we are loading igx-tree-grid load on demand as a result. On the search, the parent row loads perfectly with arrow expand indicator. On click of arrow indicator, children rows are loaded properly.

Issue: When i click on the button to Get Data, Igx Tree Grid loads with parent row and arrow indicator as result. When i click on arrow indicator, sub-grid data (children rows ) are displayed. when i click on button again, i get parent row as result but the arrow indicator is not displaying. I inspected the arrow element and its visibility is hidden in CSS.

To resolve the issue:  I want to re-load /refresh the igx-tree-grid  every time i click on button. But couldn't find any such method.

Full Repo Stackbliz: https://stackblitz.com/edit/angular-f572nu-tfucxx?file=src%2Fapp%2Ftree-grid%2Ftree-grid-load-on-demand-sample%2Ftree-grid-load-on-demand-sample.component.ts 

Please help me with this.

This is a bug in igx tree grid load on demand. As we are using this feature, we need a quick work around or fix. Reply ASAP.

Parents
No Data
Reply
  • 2155
    Verified Answer
    Offline posted

    Hello Shobhana,

    I have reproduced the problem you described.
    This is possibly a bug in the product, so it needs to be investigated as a GitHub issue.

    A possible workaround for now is to call collapseAll() method before you assign the data like below.

        public GetData()
        {
            this.treeGrid.collapseAll();
            this.treeGrid.isLoading = true;
            this.dataService.getData(-1, (children) => {
                this.data = children;
                this.treeGrid.isLoading = false;
            });
        }

Children