#select_filter question

Hi.



On my grid i have a #select_filter on the first column. its values are: ON and ON-ROHS.



when i pick “ON-ROHS” everything works as expected, and the filter works.



but when i pick “ON”, the filter does not work and shows both of the results: ON and ON-ROHS



is there a chance to make a strict check ?



i have tried the following:



mygrid.attachHeader("<select onchange=‘mygrid.filterBy(0\,’)’>ONON-ROHS")



but that did not work.



help!

The latest version allow to use both “strict” and “entry” modes
Please try to use attached js file instead of original one.
With it
    #select_filter   -   works the same
    #select_filter_strict - select entry only if it fully equal to selected option

( attached file purposed for dhtmlxgrid 1.6 )

dhtmlxgrid_filter.zip (3.91 KB)

Thank you. this works as expected.

But, when i select “empty” option, all the grid disappears. how can i show “all” options ?

Nevermind, I managed to solve this problem by adding the following line to your function:

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

thanks.

Yes, this point was missed in previously attached js files, the modification which you proposed is fully correct and will be added to the main codebase.