Select/Deselect all checkboxes inside Gridview

vishalneeraj-24503
Posted by vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 391
Use below code and call it on Header checkbox Onclick Javascriptevent as:-
function check_all_check_boxes(chk)
{
var grid_employee = document.getElementById('<%=grid_view_employee_details.ClientID %>');

if(grid_employee!=null)
{
for (row_index = 1; row_index <=grid_employee.rows.length-1; row_index++)
{
grid_employee.rows[row_index].cells[0].getElementsByTagName("input")[0].checked = chk.checked;
}
}
}

Comments or Responses

Login to post response