This could be achieved by using javascript.
Javascript for select/unselect checkbox:
function selectAllCheckBox(event, containerId, boolChecked) {
var collection = document.getElementById(containerId).getElementsByTagName('INPUT');
for (var x = 0; x < collection.length; x++) {
if (collection[x].type.toUpperCase() == 'CHECKBOX')
collection[x].checked = boolChecked;
}
event.preventDefault();
return false;
}
Javascript for updating all textbox:
function changeReadOnly(event,containerId,isReadOnly) {
var collection = document.getElementById(containerId).getElementsByTagName('INPUT');
for (var x = 0; x < collection.length; x++) {
if (collection[x].type.toUpperCase() == 'TEXT')
collection[x].readOnly = isReadOnly;
}
event.preventDefault();
return false;
}
Sample HTML:
<input type="submit" value="select all" onclick="return selectAllCheckBox(event,'divGrid', true);">
<input type="submit" value="select none" onclick="return selectAllCheckBox(event,'divGrid', false);">
<input type="submit" value="Read Only = true" onclick="return changeReadOnly(event,'divGrid',true);">
<input type="submit" value="Read Only = false" onclick="return changeReadOnly(event,'divGrid',false);">
<div id="divGrid">
<!--
</div>