11智能在线
新记
c# datagrid 在后台判断所有选择了的行获取选中行的某列
C# datagrid 而不是datagridview 需要在后台判断哪些行被选择了(复选框),选择了的行的某列赋给一个变量
举报该文章
其他看法
第1个回答 2015-02-25
循环判断复选框就可以了,利用selectitems
追问
麻烦代码给我看看吧
第2个回答 2015-02-26
for (int i = 0; i < this.datagridId.Rows.Count; i++)
{
HtmlInputCheckBox chb = gvList.Rows[i].Cells[0].FindControl("复选框ID") as HtmlInputCheckBox;
if (chb != null)
{
if (chb.Checked)
{
//你的代码
}
}
}
本回答被网友采纳
第3个回答 2015-02-25
dataGrid?? WPF的么
相似回答
大家正在搜
相关问题
c# dataGridView 选中所有行的某列
DataGridview 获取选中行的某一列
c# datagridview 如何选中行,以及怎么获取选中...
c#怎么获取datagridview选中多行的每一行中的某一...
c# DataGridView中,选中了多个行,如何获取选中...
C# datagridview控件,获取当前选中行,第1列的...
c#datagridview 如何选中行,以及怎么获取选中行...
wpf datagrid 怎么获取选中单元格所在行的某列的值