I have my code to change the row in GridView background color when the status Done. I did my code well but it doesn't work.
protected void status_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList ddlStatus = (DropDownList)sender;
string someVariable1 = ddlStatus.SelectedItem.Text; // gets the Text displayed
string someVariable2 = ddlStatus.SelectedItem.Value; // gets the Value
GridViewRow row = (GridViewRow)ddlStatus.NamingContainer;
if (someVariable1 == "Done")
{ row.BackColor = System.Drawing.Color.Red; }
}