Hello everyone,
I have a simple grid with various column and five filters. One of them is a combo box. It works well, but with just one problem. Let’s say that on 5 values, one is “Conforme” and another is “Non Conforme”.
When I select “Conforme” in the combobox, also the recors with “Non conforme” are showed. But I need to search only the exacly word. I tried to use a custom filter, but without any result. Any idea?
Please, try to use the following “#combo_filter_strict”:
dhtmlXGridObject.prototype._in_header_combo_filter_strict=function(t,i){
t.innerHTML="<div style='width:100%; padding-left:2px; overflow:hidden; ' class='combo'></div>";
t.onselectstart=function(){
return (event.cancelBubble=true);
}
t.onclick=t.onmousedown=function(e){
(e||event).cancelBubble=true; return true;
}
this.makeFilter(t.firstChild,i);
t.firstChild._filter=function(){
if (t.firstChild.value=="") return "";
var value = t.firstChild.value.toLowerCase();
return function(val){
return (val.toString().toLowerCase()==value);
};
};
this._filters_ready();
}