hi,
I need to capture the Master Checkbox’s events. How can i do it?
I want to know if its selected or de-selected.
(It’s urgent)
Thanks & Regards,
Sujoy
Can be done only by code modification.
dhtmlxgrid_filter.js , line 355
dhtmlXGridObject.prototype._in_header_master_checkbox=function(t,i,c){
t.innerHTML=c[0]+""+c[1];
var self=this;
t.firstChild.onclick=function(e){
self._build_m_order();
var j=self._m_order?self._m_order[i]:i;
var val=this.checked?1:0;
self.callEvent(“customMasterChecked”,[val]) // this line need to be added
As result you will be able to use
mygrid.attachEvent(“customMasterChecked”,function(val){
//any custom code
})
How to uncheck the master check box in case if the user selects some child check boc???
Something similar to next, may work.
mygrid.attachEvent(“onCheckbox”,function(id,ind,value){
if (!value)
mygrid.hdr.rows[rowInd].cells[cellInd].getElementsByTagName[0].checked=false;
return true;
});
where rowInd and cellInd - position of master checkbox in header.