beforeFilter: adding new rule doesn't save operator

I followed the code at docs.dhtmlx.com/doku.php?id=dhtm … :filtering to change the filtering operator from LIKE to >. I thought i was redundant, however, to create the rule and then change the operator, when the operator is specified in the add().

Hence i changed the code to:

function custom_filter1($filter_by){
print “filter1\n”;
if (!sizeof($filter_by->rules)) {
$filter_by->add(“exp_sum”,“3”,">");
}
$index = $filter_by->index(“exp_sum”,“test”);
$value = $filter_by->rules[$index][“value”];
$operator = $filter_by->rules[$index][“operator”];

            print "value: $value\n";
            print "operator: $operator\n";
            #exit;
    }

However, the grid did not filter by > and after adding some print statements in index() and using exit, it became apparent that the operator was lost in the initialization.

Can anyone explain what’s doing on? Bug?

Here you can find the example of filtering the column with “>” instead of “=”:
dhtmlx.com/docs/products/dht … ilter.html

Also you may try to use “#numeric_filter”. It allows to set “>” statement right in the text input:
dhtmlx.com/docs/products/dht … r_num.html