GridView中两个CheckBox(VB.Net+Asp.net)
Gridview中有两个(两列)checkbox,一个是Inactive,另一个是Allow Login。
当选中 Inactive时,Allow Login不被选中,反之,当选中Allow Login 时,Inactive不被选。(类似于单选框)。
请问如何实现?
<asp:TemplateField HeaderText= "Inactive " SortExpression= "User_Inactive ">
<EditItemTemplate>
<asp:CheckBox ID= "CheckBox1 " runat= "server " Checked= ' <%# Bind( "User_Inactive ") %> ' Height= "12px " Width= "50px " />
</EditItemTemplate>
<ItemStyle Width= "10% " />
<HeaderStyle Width= "10% " />
<ItemTemplate>
<asp:CheckBox ID= "CheckBox1 " runat= "server " Checked= ' <%# Bind( "User_Inactive ") %> '
Enabled= "false " />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText= "Allow Login " SortExpression= "User_AllowLogin ">