Click here to Skip to main content
15,886,833 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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

1 solution

Place gridbind function in not IsPostBack condition in page load event as follow..
if(!IsPostBack)
{
Bindgrid();
}
 
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