select_filter_strict not returning expected results

when using a select box where the values and labels don’t match, like this…



var comboboxID= mygrid.getCombo(1);

    comboboxID.put(“0”,“Pick Procedure”);

     comboboxID.put(“1”,“Blood glucose analysis”);

     comboboxID.put(“2”,“Cardioversion - synchronized”);

     comboboxID.put(“3”,“Chest decompression - needle”);

     comboboxID.put(“4”,“Cricothyrotomy - needle”);

     comboboxID.put(“5”,“Cricothyrotomy - surgical”);

     comboboxID.put(“6”,“Defibrillation - AED”);

     comboboxID.put(“7”,“Defibrillation - direct”);

     comboboxID.put(“8”,“ECG - 12 lead”);

     comboboxID.put(“9”,“Endotracheal intubation”);

     comboboxID.put(“10”,“Intraosseous insertion”);

     comboboxID.put(“11”,“Intravenous established”);

     comboboxID.put(“12”,“Nasogastric tube insertion”);

     comboboxID.put(“13”,“Nasotracheal intubation”);

     comboboxID.put(“14”,“Orogastric tube insertion”);

     comboboxID.put(“15”,“Suction - bulb”);

     comboboxID.put(“16”,“Suction - endotracheal”);

     comboboxID.put(“17”,“Suction - upper airway”);

     comboboxID.put(“18”,“Transcutaneous pacing”);

     comboboxID.put(“19”,“Ventilation assist - BVM”);

     comboboxID.put(“20”,“Ventilation assist - mechanical”);

     comboboxID.put(“21”,“Ventilation assist - pocket mask”);



this function…



dhtmlXGridObject.prototype._in_header_select_filter_strict=function(t,i){

    t.innerHTML="";

    t.onclick=function(e){ (e||event).cancelBubble=true; return false; }

    this.makeFilter(t.firstChild,i);

    t.firstChild._filter=function(){ return function(val){

        if (t.firstChild.value.toLowerCase() == “”) return true;

        return (val.toString().toLowerCase()==t.firstChild.value.toLowerCase());

    }}

    this._filters_ready();

}



doesn’t return expected results, it returns no results, the regular select_filter returns results, but if you select “Cricothyrotomy - needle” for example (with a value of 4) the grid shows results where rows have 4 or 14.



when using the strict filter, if you choose “Orogastric tube insertion” for example from the dropdown filter, it uses the text, not the the value as the filter.



how could i modify this function to use “14” instead of “Orogastric tube insertion” when filtering. the actual data in that column is all numbers, but they are masked to look like text with the help of the grid combo functionality.



thanks.

Please be sure that you not only added code of dhtmlXGridObject.prototype._in_header_select_filter_strict, but also using a #select_filter_strict shortcut in header, for filter creation.
The sample, which use the same data and works correctly sent by email.

The issue with strict filtering against co|coro columns was confirmed and fixed.
Fix will be released as part of next build.
If you need it ASAP - you can use attached js file instead of original one.

dhtmlxgrid_filter.zip (4.21 KB)

works perfectly, thanks.