Hello,
I’ve created a grid with 3 columns. (ed,ch,ch).
Above the grid is a header with #combo_filter,{#clear_button},{#clear_button}
For each clear_button I create a ‘three-state’-button-checkbox (On/Off/Disable)
mygrid._in_header_clear_button=function(tag,index,data){
tag.innerHTML="<input type='image' src='../dhtmlx/imgs/ChOffBwDis.png' />";
var grid = this;
tag.firstChild.onclick=function(){
if (aanuitknop[index]==1){
aanuitknop[index]=0;
this.setAttribute("src", '../dhtmlx/imgs/ChOffBw.png')
mygrid.filterBy(index,'0');
}
else if (aanuitknop[index]==2){
aanuitknop[index]=1;
this.setAttribute("src", '../dhtmlx/imgs/ChOnBw.png')
mygrid.filterBy(index,'1');
}
else {
aanuitknop[index]=2;
this.setAttribute("src", '../dhtmlx/imgs/ChOffBwDis.png')
mygrid.filterBy(index,0);
}
}
};
If I click on the button the image of the button changes and the grid is filtering on the checkbox.
However, if the filter in column 2 is checked, the filter in column 3 or column 1 is forgotten.
Any Idea to solve this.
Regards,
Laurens