See this code:
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox chk = (CheckBox)row.Cells[0].FindControl("CheckBox1");
if(chk.Checked)
row.BackColor = System.Drawing.ColorTranslator.FromHtml("#000");
}
I assumed the checkbox is in first cell of GridView. Put this code whenever you want to change background color of selected rows(for example,in button click).
Regards..