标签:gridview
根据CheckBox选中的行取出某列的值:
for (int i = 0; i < this.GridView1.Rows.Count; i++)
{
CheckBox ckb = (CheckBox)this.GridView1.Rows[i].Cells[0].FindControl("CheckBox1");
if (ckb.Checked)
{
huohao =Convert.ToInt32(this.GridView1.Rows[i].Cells[2].Text);
shuliang = Convert.ToInt32(this.GridView1.Rows[i].Cells[3].Text);
danjia =Convert.ToDecimal(this.GridView1.Rows[i].Cells[4].Text);
heJiJinE =Convert.ToDecimal(this.GridView1.Rows[i].Cells[5].Text);
jinhuoId =Convert.ToInt32(this.GridView1.Rows[i].Cells[7].Text);
}
}
GridView中根据CheckBox选中的行取出某列的值,布布扣,bubuko.com
标签:gridview
原文地址:http://blog.csdn.net/u012810138/article/details/38513649