Hello people, i need your help here. i have a gridview with three fields: Id,Condition and Status.
Under condition i have only two types of data stored - 'Approved' and 'Notapproved' and under status i have checkboxes.
i want: while the page loads, there will be a loop on the gridview rows such that
if the field "Condition" (from database) has the word "approved" then the checkbox of the gridview row will be checked else it will not be checked. please help. here is the code. Also tell me how to update it.
protected void Page_Load(object sender, EventArgs e)
{
foreach (GridViewRow gr in GridView1.Rows)
{
//if the field "Condition" (from database) has the word "approved"
//then the checkbox of the gridview row will be checked else
//it will not be checked
}
}