Categories | Question details Back To List | ||
dhtmlxGrid: omCheck event Hi, I am attaching onCheck event to my grid. It works fine if i click on a checkbox in any row. However event doesn't get triggered if a master checkbox in the header is clicked. Any idea ? thanks Victoria Answer posted by dhxSupport on Dec 15, 2009 02:21 "onCheck" event fires only for checkboxes at the rows. To add "onCheck" event handler to the master checkbox you should modify code: At file dhtmlxgrid_filter.js: dhtmlXGridObject.prototype._in_header_master_checkbox=function(t,i,c){ t.innerHTML=c[0]+"<input type='checkbox' />"+c[1]; var self=this; t.firstChild.onclick=function(e){ //any custom logic here self._build_m_order(); var j=self._m_order?self._m_order[i]:i; var val=this.checked?1:0; self.forEachRowA(function(id){ var c=this.cells(id,j); if (c.isCheckbox()) c.setValue(val); }); (e||event).cancelBubble=true; } } |