Friday, 16 July 2010

check-uncheck-checkboxes-in-gridview-using-javascript









function selectAll(invoker)

{

var inputElements = document.getElementsByTagName('input');

for (var i = 0 ; i <>

{

var myElement = inputElements[i];

if (myElement.type === "checkbox")

{

myElement.checked = invoker.checked;

}

}

}

call the above javascript function in

asp:CheckBox ID="chkAll" runat="server" OnClick="selectAll(this)" OnCheckedChanged="CheckAll" AutoPostBack="True"

No comments:

Post a Comment