select / unselect all & individual checkbox in gridview
i surfed the net & found may links for the same but along with it i need the same to function for multiple grid
in a page i have a tabcontainer with 6 tabs each having a gridview with checkbox
need a javascript function to select /unselect the gridview check box
and alos when a row is checked few cells from the checked row shld be enabled as all the cell on load are disabled
You can use the following function to get all of the checkboxes that are within a designated parent area.
function getCheckboxes(parent) {
parent = parent || document;
var inputs = parent.querySelectorAll('input'),
i,
checkboxes = [];
for (i = 0; i < inputs.length; i += 1) {
if (inputs[i].type.toLowerCase() === 'checkbox') {
checkboxes.push(inputs[i]);
}
}
return checkboxes;
}