Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 gridview paging problem
Posted by charan on  4/10/2010 4:47:45 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
hi iam using asp.net2.0 with c#

In the gridview 1st column is checkbox,in my gridview iam using paging , iam dispalying data at page load,

when user selects the check box that records are stored in database.
but when i selects the checkbox at 1st page then it is
storing all the records but when i selects the 1st page records as well as 2nd page records
then it is storing only second page records .

iwant to store all the records what ever user has selects the checkbox.

can you give me example which helps me.

Post Your Reply Post New Question

 Viewer's Reply
Save data from different pages in a gridview
Answered By Moderator1 on 6/9/2010 2:08:13 AM

The checkbox you checked in page 1 of the gridview cannot be passed to the second page, since the value you choosed will be lost. To avoid this, you need to store the checked values in a viewstate before you click on the paging link. Then you can save 1st page and 2nd page gridiview records in database tables.
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Web Application Security — How to Minimize Prevalent Risk of Attacks
Introduction to Web Applications Development
Everything You Know About CSS Is Wrong! - Free 37 Page Preview!