日期:2014-05-17 浏览次数:20485 次
<asp:TemplateField HeaderText="全选">
<HeaderTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True"
oncheckedchanged="CheckBox1_CheckedChanged" Text=" " />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="ck" runat="server" oncheckedchanged="ck_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)现在我想获得选中项的id值,并根据此ID值,在弹出层中显示详细信息??请问如何实现着个过程
{
CheckBox all = (CheckBox)sender;
foreach (GridViewRow g in GridView1.Rows)
{
CheckBox ck = (CheckBox)g.FindControl("ck");
ck.Checked = all.Checked;
}
}
protected void ck_CheckedChanged(object sender, EventArgs e)
{
}