foreach (GridViewRow Row in grdRights.Rows) { CheckBox cb = (CheckBox)Row.FindControl("chkAllowDeny"); }But the other 2 columnd are bound, and there's no public ID property. So how do I get the values of these two columns?
TextBox txt= (TextBox)Row.FindControl(-- name here --);But if I can't set the ID, then what's the name?
string textBoxText = ((TextBox)Row.FindControl(Row.Controls[0].ID)).Text;
But it errors with "Object reference not set to an instance of an object"