Click here to Skip to main content
12,630,940 members (32,977 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Gridview checkbox
I have a gridview that, from within the code behind, I bind to a DataTable and programmatically populate number of rows and cell values.

When I click on a checkbox that has AutoPostBack set to true, the gridview resets. Since the events for the checkbox are executed only when its AutoPostBack is set to true, how do I maintain those values in the gridview? Can I get the checkbox events to fire when its AutoPostBack is set to false?

Thanks.
Posted 31-Oct-12 13:28pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Place gridbind function in not IsPostBack condition in page load event as follow..
if(!IsPostBack)
{
Bindgrid();
}
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 1 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100