hi,
how do we select multiple checkboxes in datagrid using a checkbox in the header of that datagrid. I went successful in adding each check boxes to each row. Now insted of selecting each checkbox individually i used a checkbox in the header of that datagrid. So when i check this, all the checkboxes in my datagrid should get selected and when i deselect the reverse should happen. How can i do this. I tried it this way
var checkflag="false"; var re; function checkall(aspCheckBoxID, checkVal) { re = new RegExp(':' + aspCheckBoxID + '$'); for(i = 0; document.forms[0].elements.length; i++) { elm = document.forms[0].elements[i]; if (elm.type == 'checkbox') { if (re.test(elm.name)) { elm.checked = checkVal; } } } }