Click here to Skip to main content
15,667,014 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
How to maintain the checked state of a check box during Paging in a GridView Control.
I am binding the grid in page indexing.

I tried for a solution by searching in google.

The given code is not working, it throws "casting error
in conversion from checkbox type to bool"

Is there any solution for retaining the checkbox values during paging.

Updated 11-Mar-11 2:07am
OriginalGriff 11-Mar-11 8:38am    
"The given code is not working, it throws..."
What code is this? Since we can't see it, it is very difficult to debug...

Edit your question and provide the relevant code fragment!
Sandeep Mewara 11-Mar-11 9:13am    
Sounds like Web. Is it web or windows?
fjdiewornncalwe 11-Mar-11 10:10am    
We'll need to see the code, but if you are getting that error then I am assuming that you are somewhere comparing the chkBoxControl == true instead of chkBoxControl.Checked == true. Post a snippet and we can help you much more effectively.

1 solution

Marcus Kramer's comment is almost sure the correct answer! Use it.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900