Hi,
I have a listview that binds data using sqldatasource. I have used DataPager to show 20 records per page. Each row has a check box in the last cell. My issue is that I am not able to maintain the status of the checkbox when navigating between pages. For example, if I select a couple of check boxes on the first page, navigate to the second page, select a couple more and navigate back to the first page, the status of checkboxes are lost. I am at a loss to find out how to maintain the status of the checkboxes.
Once the status of the checkboxes is maintained, I want to write each of those lines into the database on a button click after appropriate selections are made.
Any help please.
Thanks and Regards,
Mohan
Loading
PJ MartinsPosted Jun 18, 2010, 10:41 AM
On page load up you can instantiate your variable: ViewState["CheckedBoxes"] = new List
Mohan MudaliarPosted Jun 18, 2010, 3:43 AM
If you are referring to "EnableViewState" property of the checkbox control, then I have already done it. I have enabled it for the page and listview too. It does not seem to work. I dont know how else to do it. Do you have any other suggestions please?
Best Regards,
Mohan
PJ MartinsPosted Jun 17, 2010, 11:44 AM