Use JQuery fix RadioButton in GridView multi check problem
时间:2011-01-12 来源:IT老民工
$('input[type="radio"]').click(function () { $.each($('input[type="radio"]'), function () { this.checked = false; }); this.checked = true; }); <asp:GridView ID="GridView1" > <Columns> <asp:TemplateField> <ItemTemplate> <asp:RadioButton ID="RadioButton1" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:BoundField HeaderText="Employee #" DataField="empid" /> <asp:BoundField HeaderText="Last Name" DataField="lastname" /> <asp:BoundField HeaderText="First Name" DataField="firstname" /> </Columns> </asp:GridView>
相关阅读 更多 +