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
20
CheckBox lost state with WebGrid paging
posted

Hi

 I am using infragistics 2008 ultrawebGrid in my page and i in one of the pages i want to add a checkbox column to the grid. Ok, ths was fine, the problem its when y use paging and i want the user to check any rows he want; when he want to change the page, changes ok but if i return to the old page, the rows that i checked they are not longer checked.

I thought it was the WARP but taking it out it doesnt work. I bind a dataset to the grid in code behind when i push the button "SEARCH". I use a DataSet as datasource and i dont manage any event of the grid (i think is no use to manage it)

 Thanks for your help.

Parents
  • 45049
    posted

    You need to save the value of each underlying cell in this column (which represents the checked state of each checkbox), likely using the UpdateRow, UpdateRowBatch, UpdateCell, or UpdateCellBatch events of the grid.  Which event you use depends on how often you want updates to be processed, whether or not you're using the grid's built-in AJAX functionality, and if not using AJAX if you want to immediately trigger a postback or wait until a postback is triggered in some other way.

    What's happening is that, when you switch pages, you're implicitly re-binding the grid so that it displays the desired page's data.  When you go back to the first page, you're binding to the first page's rows again.  A side-effect of this is that any updates that were performed but not saved are lost.

Reply Children