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
335
Header CheckboxState resets on datasource change
posted

Hi everyone,

I'm using header checkboxes in my ultragrid. A User is able to change the datasource of the grid, depending on what DataTable he wants to get displayed in the grid. Unfortunately, everytime I change the datasource back and forth, the state of the header checkboxes a datasource had before, is not saved. It has now the state of the last datasource which was bound to the grid. I read in another thread, that this is happening because the layout gets resetted everytime another datasource was bound to the grid.

Is it somehow possible to retain the state or can anyone suggest a workaround?

 

Parents
  • 69832
    Offline posted

    The header checkboxes represent the state of each of the cells in the associated column, so if that column is removed, as is the case when you assign a new data source, the header checkbox should and does reflect this change. If I understood everything, this sounds like correct behavior.

    You could work around this by caching the cell values of the checkbox column before assigning the new data source, then matching them up to the new cells after the new data source is assigned. The header checkbox would then follow suit, since it "listens" for changes to those cells.

Reply Children