protected void cbCheckAll0_CheckedChanged(object sender, EventArgs e)
{
if (cbCheckAll0.Checked)//如果全选的checkbox被选中
{
for (int i = 0; i < this.ListView1.Items.Count; i++)
{
CheckBox box = this.ListView1.Items[i].Controls[8].FindControl("CheckBox1") as CheckBox;//遍历listview中的下拉框
box.Checked = true;//设成选中状态
}
}
else
{
for (int i = 0; i < this.ListView1.Items.Count; i++)
{
CheckBox box = this.ListView1.Items[i].Controls[8].FindControl("CheckBox1") as CheckBox;
box.Checked = false;
}
}
}