Click here to Skip to main content
Rate this: bad
good
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 12: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)



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