The value in ((CheckBox)row. FindControl("Ch eckBox2")).Chec ked; might not be initialized. Please check if there is any value being taken in it. you can use break points to do it.