<asp:TemplateColumn>
<HeaderTemplate>
<INPUT id="cbCheckAll" onclick="CheckItems();" type="checkbox" enabled="false">
</HeaderTemplate>
<ItemTemplate>
<INPUT type=checkbox value='<%# Container.dataitem("VendorCode") %>' name=cbdgVendorCode>
</ItemTemplate>
</asp:TemplateColumn>
function CheckItems() //// Check & Uncheck the check boxes in the datagrid
{
try
{
chkField = eval(document.getElementsByName("cbdgVendorCode"));
if (document.getElementById("cbCheckAll").checked)
val= true;
else
val=false;
for (i = 0; i < chkField.length ; i++)
{
chkField[i].checked = val ;
//alert(chkField[i].value);
}
}
catch(e) {}
}
Wednesday, October 19, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment