Tuesday, February 01, 2011

Gridview RowEditing checkbox value

We know if we have manually binds the data then, we can access the checkbox or what ever the control by it's id.
as follows

CheckBox ck = (CheckBox)GridView1.Rows[e.NewEditIndex].Cells[8].FindControl("yourCheckBoxControl");



 



What if you auto bided the data to a gridview,



CheckBox ck = (CheckBox)GridView1.Rows[e.NewEditIndex].Cells[8].Controls[0];

0 comments:

My Achievements
Member of
Blog Archive
Followers
free counters