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的么
相似回答