.net 网站gvList取值

[复制链接]
查看11 | 回复1 | 2011-2-21 14:36:34 | 显示全部楼层 |阅读模式
for (int i = 0; i < gvList0.Rows.Count; i++)

{

if (((CheckBox)gvList0.Rows.Cells[0].FindControl("cbSelect0")).Checked)

{

bool aaa = ((CheckBox)gvList0.Rows.Cells[0].FindControl("cbSelect0")).Checked;

string aa = gvList0.DataKeys[0][0].ToString();

arys.Add(gvList0.DataKeys[0][0].ToString());

string a = gvList0.Rows.Cells[6].Text.ToString();

aryState1.Add(a);

}

}
前面有个选择cbSelect0能判断出选择的那个但是取不出 选择后面那列的值

回复

使用道具 举报

千问 | 2011-2-21 14:36:34 | 显示全部楼层
CheckBox cbox = (CheckBox)gvList0.Rows.FindControl("cbSelect0");
if (cbox.Checked == true)你这样试试。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行