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.

It can be done only with code modification. In the file dhtmlxgrid_filter.js:

var self=this;
//any custom code here