【Daily】为GridView控件添加Checkboxes列
【Daily】为GridView控件添加Checkboxes列
http://www.bianceng.cn/webkf/aspx/201008/18808_6.htm
1、GridView控件之外有个button控件,在button_onclick事件中获取GridView控件中选中的Checkboxes
protected void DeleteSelectedProducts_Click(object sender, EventArgs e)
{
foreach (GridViewRow row in Products.Rows)
{
CheckBox cb = (CheckBox) row.FindControl("ProductSelector");
if (cb != null && cb.Checked)
{
}
}
}
http://www.bianceng.cn/webkf/aspx/201008/18808_6.htm
1、GridView控件之外有个button控件,在button_onclick事件中获取GridView控件中选中的Checkboxes
protected void DeleteSelectedProducts_Click(object sender, EventArgs e)
{
foreach (GridViewRow row in Products.Rows)
{
CheckBox cb = (CheckBox) row.FindControl("ProductSelector");
if (cb != null && cb.Checked)
{
}
}
}