Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 23, 2012 09:21 AM by ItsSunny
Mar 23, 2012 08:33 AM|LINK
I have a problem. I'm using gridview to display data. when gridview display the data, i allow user to choose the data by checked the check box then user will see how many check box that they checked below the gridview. if user only check in 1 page of gridview
thats ok it show total of checked checkbox in that page. but problem comes up when user move to second page of gridview, the total will start again from 0 which means i lost the total of the checkbox from the first page.
anyone know how to solve it?
Mar 23, 2012 08:35 AM|LINK
How are you storing the count of checked items??
Mar 23, 2012 08:54 AM|LINK
That's actually I want to ask. How to store the count of checked items. Because I can keep the check box checked eventhough the user move to another page.
Mar 23, 2012 09:21 AM|LINK
you can do it either from server side and client side .If you are using server side .you can save the count in sessionstate or viewstate.
You have to traverse the gridview for the total no of selected items .you can also do it from client side using jquery which is the best way avoiding postbacks .check this