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
255
On refresh, how to retain the grid rows expanded state?
posted

In UltraWinGrid, the grouped rows are expanded using expand symbol (+). On grid refresh, again the rows are getting collapsed. How to retain the expanded state? (Note: Grouping is done based on multiple columns). While refreshing the grid (to reflected the newly added rows or any updates), i tried to use "Grid.Rows.Refresh(RefreshRow.ReloadData)". But it is not reflecting the newly added rows. How to overcome this problem?

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    It all depends on what you mean by "grid refresh". The Refresh method on the grid just causes the grid to paint. This will have no effect on the expanded states of the rows.

    If you losing the expanded states on the rows, then you are probably re-setting the grid's data source, or doing something that causes the grid to get a Reset notification from the BindingManager. In such a case, all grid rows are destroyed and a new set or rows is created to show the new data. The grid cannot associate the old rows with the new data.

    The best thing to do in a case like this is to avoid completely re-setting the data source, which is a particularly destructive operation.

Children