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?