FindControl on GridView Cell returning null
This is the problem I am facing (VS2005):
- I do a GridView1.DataSource = DataTable and GridView1.DataBind()
- then I add checkbox coltrols to a selected few cells of the GridView:
CheckBox cb = new checkBox();
cb.ID = "cbSelect";
Every thing works fine and I am able to see the checkboxes on screen.
The user is suppose to select the checkbox, which ever is applicable
and is suppose to click a button for further processing.
On click of the button, I try to fetch the checkBoxes by doing
FindControl on the appropriate cells:
CheckBox cb =
But I always get cb as null. Any idea what might be wrong here ?
Yes, on button click, I check for the controls *before* reassigning the
|All times are GMT. The time now is 03:27 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.