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
How to reload igx grid when data is changed programmatically
posted

I want to reload/refresh grid data. I am changing data in ts programmatically but it is not showing on UI Immediately. 
But when I click or scroll the grid, the changed data is shown.

  • 600
    Offline posted

    Hello Amruta Sawle,

    Thank you for posting to Infragistics Community!

    I have been looking at your question and I have created a small sample trying to reproduce the described behaviour. I am using IgxGrid and on button click I am changing the data source of the grid. On my side everything works as expected and the data is changed immediately.

    However, since I was not sure when and how you are changing the data on your side, if the attached sample is not an accurate demonstration of what you are trying to achieve, I could suggest calling the igx-grid detectChanges method

    this.grid.cdr.detectChanges();

    or declaring a ChangeDetectorRef property in the component constructor and call its detectChanges method.

    Here could be found my sample for your reference. Please test it on your side and let me know if you need any further assistance.

    If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce.

    Looking forward to hearing from you.

     

    Regards,
    Riva Ivanova
    Entry Level Software Developer
    Infragistics, Inc.

  • 0
    Offline posted

    I'm facing this same problem. I really appreciate the effort of whoever will aid.

    Thanks