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
Is there a way to know if grid is loaded with data
posted

Hi Team,

I am using Hierarichal grid load on demand.


I wanted to open the child grid whose id is stored in my local storage after the parent 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.

Meanwhile i am using setTimeOut () method but this is not a good approach. 

I am on :

igniteui-angular: v9.1.28

Angular: 9

Please reply ASAP as this is an ongoing project.

Parents
No Data
Reply
  • 2680
    Offline posted

    Hi Shobhana,

    A parent row can be expanded with the help of the expandRow method of the grid, available in the earlier 9.1.28 version as well. Since you would like a child grid to be shown, its parent record’s ID has to be stored, rather than a child grid identificator itself.

    Since you are using load on demand, this indicates you are fetching the data, for example from a service, and so you are in control of when and how this happens, that is when the data is assigned or bound. Having this in mind, this would be the place to execute whatever logic you would like, once the data is bound. Namely, there can be invoked the expandRow method.

    Finally, I am unable to understand what is the setTimeout() method used for, based on the provided description, nevertheless, in this sample, I tested that the expandRow method call does not need to be invoked from a setTimeout/requestAnimationFrame callback in order for the row to be expanded. Nevertheless, if in your app this is needed due to some application specifics, I would not say that this is a wrong approach, as it simply schedules a new task in the browser queue and gives the chance for the needed updates to take effect berforehand.

    If you need further assistance, my suggestion is to fork and modify any of our documentation demos to better illustrate your application setup, scenario and explain the requirements. Thank you for your cooperation.

    Best regards,
    Bozhidara Pachilova

Children