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
3555
Prevent Grid from Collapsing
posted
I have the grid in a grouped state, and when I refresh the grid (to reload
the data from the database) it collapases all the grouped rows, is there a
way to prevent this?
Parents
No Data
Reply
  • 469350
    Offline posted

    It depends what exactly you are doing when you "refresh" the grid. It sounds like whatever you are doing is causing your DataSource to send a Reset notification. That means that the data has been completely recreated. So the grid throws away all rows and columns and re-creates everything from scratch - so the rows cannot maintain their original state like selection or expansion. 

    The best thing to do is not cause a reset notification. There may be a better way for you to update your data.

    The alternative would be for you to store the states of each row yourself. You can't store the row object itself, because once the reset occurs, the old rows are thrown away and new ones are created. So you would have to store the expanded state of each row based on the data in that row - perhap using the primary key.

Children