//定义数据集,用来存储已选中行的状态名称
List<string> list = new List<string>();
for (int i = 0; i < this.GridView1.Rows.Count; i++)
{
CheckBox ckcbox = this.GridView1.Rows[i].FindControl("ckbId") as CheckBox;
if (ckcbox.Checked)
{
Label lb = (Label)GridView1.Rows[i].Cells[11].FindControl("lbvalue");
list.Add(lb.Text.ToString());
}
}
List<string> list = new List<string>();
for (int i = 0; i < this.GridView1.Rows.Count; i++)
{
CheckBox ckcbox = this.GridView1.Rows[i].FindControl("ckbId") as CheckBox;
if (ckcbox.Checked)
{
Label lb = (Label)GridView1.Rows[i].Cells[11].FindControl("lbvalue");
list.Add(lb.Text.ToString());
}
}