Hello dhtmlxSupport,
since dhtmlxConnector 1.x a custom function called by the ‘beforeFilter’-event has an object as (obviously single) parameter. We can manipulate filter data on this object like this
$index = $filter_by->index("some_field");
if ($index!==false) //there is client side input for the filter
$filter_by->rules[$index]["operation"]=">";
… as written in the docs.
In a former version we had two parameters $col and $mask and were able to write custom filter queries like this:
[code]$gridConnector->event->attach(“beforeFilter”, “manageFilters”);
function manageFilter($col, $mask){
$like = $column." LIKE ‘%“.$mask.”%’";
return $like;
}[/code]
To be up2date, i updated dhtmlxDataProcessor and dhtmlxConnector libraries on a former project.
Now I need those custom filtering because the filter query is filled with 'AND’s, 'OR’s and more than one column. Is that possible with dhtmlxConnector 1.0 ?
I will give you an example of how the filter query should look like:
CURRENT_TIMESTAMP < col1 AND col2 = 0
Thanks in advance,
Peter