事件:
protected void C_1_OnCheckedChanged(object sender,EventArgs e)
{
for (int i = 0; i < this.GridView1.Rows.Count; i++)
{
CheckBox c_1 = (CheckBox)this.GridView1.Rows[i].FindControl("c_1");
if (c_1.Checked == true)
{
this.GridView1.Rows[i].BackColor = Color.Red;
}
else if (c_1.Checked==false)
{
this.GridView1.Rows[i].BackColor = Color.White;
}
}
}
没用脚本