最常见的在控件中嵌套控件是,在DataGrid中嵌套一个 CheckBox,
效果是可以知道哪些被选中
for (int i=0; i<DataGrid1.Items.Count;i++)
{
bool isChecked = ((CheckBox)DataGrid1.Items[i].FindControl("Checkbox2")).Checked;
if (isChecked == true)
{
res1 = "testing/tiank/item/"+temp[i];
_ArrayList.Add(res1);
}
}
DataGrid中嵌套CheckBox实现选中判断
博客介绍了在控件中嵌套控件的常见操作,即在DataGrid中嵌套CheckBox,通过代码实现判断哪些选项被选中,并将选中项相关信息添加到ArrayList中,使用的技术涉及.net和DataGrid。
967

被折叠的 条评论
为什么被折叠?



