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.
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; }); }
Hi Mihoko,
This still does not resolve the issue, You can try in the stackbliz sample i have provided.
Scenario: When i click Get data button for first time, and than grid data loads. I click on the collapse button. When i click on the Get Data button again, the collapse button is not visible. Only parent row is visible. As we are using in our on going project, so we need a quick work around ASAP. Also kindly raise a request to fix this bug ASAP.