beforeFilter: adding new rule doesn't save operator

I followed the code at … :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)) {
$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";

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 “=”: … ilter.html

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