function RadioCheck(rb) {
var gv = document.getElementById("<%=gvLeft.ClientID%>");
var rbs = gv.getElementsByTagName("input");
var row = rb.parentNode.parentNode;
for (var i = 0; i < rbs.length; i++) { if (rbs[i].type == "radio") { if (rbs[i].checked && rbs[i] != rb) { rbs[i].checked = false; break; } } } }
Call this function in Grid View item template where ever the radio button is there as shown below:
asp:RadioButton ID="chk1" runat="server" onclick="RadioCheck(this);"
No comments:
Post a Comment