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
558
Refresh Expandable Rows
posted

Hi,

I have a xamdatagrid that's contains a hierarchical dataset.  The DataSource for the data set is part of the data context.  When I refresh the DataSource, the grid essentially re-initializes and all of the rows collapse again.  Is there a way to keep the expanded rows after the refresh?  I'm not sure if I'm setting the data source correctly by overwriting the old one which forces the re-initialization.  

Thanks,

Kyle

Parents
No Data
Reply
  • 69686
    Verified Answer
    posted

    Hello Kyle,

    Currently there is no built-in mechanism to save the expanded state of the records. When the data source is changed, new data records are created which have no notion of the expanded status of the records before them. You could manually save the indices of all the records before changing the data source and restore the expanded state in the initialize records event. You can use the e.ReInitialize property to execute this code only when the record initializes for the first time.

Children