Custom filter logic

Hi,

I have to use dhtmlx36 but its documentations say that overwriting custom filter logic is supported, so old version shouldn’t be a problem.

What I need to do, to filter grid data by value inputed in header filter field + some default value. Eg. if i write in filter “Carol” I would like to display all Carols and all records with “Noname” value.

I followed documentation, and for test purposes wrote:

mygrid.getFilterElement(0);
searchField._filter = function(){
    return function(value, id){
        return true;
   }
}

(tried also use false instead true). Whatever I returns, always get empty grid (no errors in console)
but if i type something like:

mygrid.getFilterElement(0);
searchField._filter = function(){
    return "Carol";
}

I’ll recive all records containing “Carol”.

Does anyone have similarly problem? What am I do wrong?

Unfortunately the problem cannot be reconstructed locally.
Please, refer to the following snippet:
snippet.dhtmlx.com/81a9ef507
If the problem still occurs for you please, share with a similar snippet or a complete demo, where the problem can be reconstructed.

Proposed example, works correctly locally with my version of libraries. After many tests, it seems problem is with #connector_select_filter. If any of headers has such header, custom logic fails.

connector_filter is a server-side filter. It is not available to use the customization logic of the client-side filters for the server-side filters.
Here you can find a tutorial about custom server-side filtration:
docs.dhtmlx.com/grid__dynamic_l … otheserver

After adding a filter to your report, the filter is numbered. Your first filter becomes Filter 1 and your second filter becomes Filter 2. You apply filter logic based on these numbered filters.