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
35
Igx Tree Grid data on load event
posted

Hi Team,
I wanted to do some operation when the grid is loaded with data. However I couldn't find any event that gets triggered which signals that the data is loaded and grid is rendered.

I am on :

igniteui-angular: v10.0.0

Angular: 10.0.0


Thanks

Parents
No Data
Reply
  • 640
    Offline posted

    Hello Ajay,

    Thank you for posting in our community.

    At this point we do not provide an event that is emitted when the data of the grid is initially loaded. What I can suggest in order to have this feature implemented in any of our future releases is logging this as a feature request in our GitHub repository here. Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case.

    This will give you the opportunity do directly communicate with our development team regarding the issue and get notifications whenever a new information is available. Once logged, please provide me the link to your issue to that I can prioritize it accordingly.

    What I can suggest as an alternative, for achieving your requirement, is creating a loop in the ngOnInit lifecycle hook, that will execute the needed code when the grid's data is loaded:

    public ngOnInit(): void {
            this.interval = setInterval(() => {
                if (this.treeGrid.data?.length > 0) {
                    console.log('*** Data is loaded! ***');
                    clearInterval(this.interval);
                }
            });
            ...
      }

    I have created a small sample, illustrating my suggestion, which you can find here. Please test it on your side and let me know whether you find it helpful.

    Please let me know if you need any further assistance.

    Regards,
    Viktor Kombov
    Entry Level Software Developer
    Infragistics, Inc.

Children
No Data