grid checkbox filter

I would like to have a checkbox filter for a column in my grid, but if the master checkbox is selected, I want to only show rows which have their checkbox currentlyselected, and vice versa. Currently the master checkbox filter only selects or deselects all the checkboxes in the column, but does not filter them by whether they are checked or not…



Thanks.

Its pretty easy to define your custom filter.

dhtmlXGridObject.prototype.in_headerfilter_checkbox=function(t,i,c){
t.innerHTML=c[0]+""+c[1];
var self=this;
t.firstChild.onclick=function(e){
self.filterBy(i,this.checked?1:0);
(e||event).cancelBubble=true;
}
}


grid.attachHeader("#filter_checkbox,…")

Apologies my javascript isn’t great but I want to include rows with the checkbox ticked if the master checkbox is ticked and to exclude ticked rows if the master checkbox is unticked - in other words the opposit of the way this code is working - how do I need to amend the code?

You can implement custom filtering function using filterBy() method. Please see more information here dhtmlx.com/docs/products/dhtmlxG … grid_fsing