I'm trying to manually trigger load animation as the data fetching is handled from an external source
Hi Farhan,
Query #: How to manually trigger loading animation in TreeGrid
You can manually trigger the loading animation by showSpinner method and hide the loading animation by hideSpinner method in treegrid.
Please refer to the documentation : https://ej2.syncfusion.com/angular/documentation/treegrid/how-to/show-spinner-while-exporting
Please refer to the API for showSpinner : https://ej2.syncfusion.com/angular/documentation/api/treegrid/#showspinner
Please refer to the API for hideSpinner : https://ej2.syncfusion.com/angular/documentation/api/treegrid/#hidespinner
Share more details if the above solution is different from your expected requirement.
Regards,
Shek Mohammed Asiq
This will show Spinner, but for my component, I am using Shimmer.
It is ignoring my loading indicator setting in TreeGrid
Farhan Alam,
We have checked your query and you can manually trigger Shimmer effect using showMaskRow and removeMaskRow Grid component methods from calling Grid instance from TreeGrid.
Refer to the below code:-
public onClick = (args) => { var treegrid = (document.getElementsByClassName('e-treegrid')[0] as any) .ej2_instances[0]; // show Shimmer effect manually using this showMaskRow method treegrid.grid.showMaskRow(); } |
public onClick = (args) => { var treegrid = (document.getElementsByClassName('e-treegrid')[0] as any) .ej2_instances[0]; // remove Shimmer effect manually using this removeMaskRow method treegrid.grid.removeMaskRow(); } |
Please get back to us if you need any further assistance.
Regards,
Farveen sulthana T
Thanks, this seems to work. However showMaskRow and removeMaskRow are not listed in the TreeGrid API documentation. would be nice it was updated
https://ej2.syncfusion.com/angular/documentation/api/treegrid/
Farhan Alam,
We are happy to hear that your issue has been resolved. Unfortunately, we don’t have direct methods for showMaskRow and removeMaskRow in the Tree Grid. As of now, we suggest using these methods from Grid instance.
Please get back to us if you need any further assistance.