Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Eldric Dsouza on Oct 10, 2009 13:05
open dhtmlx forum
Call custom function for Master_Checkbox

I have a master checkbox in my grid. When i click the master checkbox, it performs the default behaviour of checking/unchecking the checkboxes in its respective column. Its okay till here.
I want to call a function when the master checkbox is selected/unselected. How do a assign a custom function to it...Is there a way to attach an Event to this master checkbox.
Answer posted by dhxSupport on Oct 12, 2009 07:46
It can be done only with code modification. In the 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 code here
...
}
}