Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 23, 2012 05:38 PM by m.koopman
Dec 23, 2012 10:06 AM|LINK
im trying to capture updated data from gridview upon check box selection..
however im unable to retreive new data..
it alwasy capture old data...pls help me...
i haave used gridediteventargs..but in vain......
i want to capture new data in button click event
Dec 23, 2012 11:02 AM|LINK
Dec 23, 2012 02:03 PM|LINK
Please show your sample code. It will be difficult to figure out what's happening in there. Meanwhile you can check this link for getting new data from database.
Dec 23, 2012 04:11 PM|LINK
as per my understanding you need to access the gird template control's value on checkbox change event which exist in grid it self
So here is the solution
1) allow checkbox to Autopostback event true in html code like below syntax also define a checked changed event "Oncheckedchanged" event
to change Notification email settings!"
2) on code behind write following code
protected void chkNotify_CheckedChanged(object sender, EventArgs e)
GridViewRow gvRow = ((CheckBox)sender).NamingContainer as GridViewRow; CheckBox chkbx = sender as CheckBox; //Now find other controls in gvrow object
I hope this will help you.
Dec 23, 2012 05:38 PM|LINK
Do you do your databinding in your page load event handler? If so you might wanna make sure you only do the databinding when the page is not in a postback state. So e.g.:
protected override void OnLoad(EventArgs e)
//Do your databinding