Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by pepys on Apr 03, 2009 05:43
open dhtmlx forum
Grid Filters issues

    $strXML .= "<beforeInit>";
    $strXML .= "<call command='attachHeader'>";
        $strXML .= "<param>,#combo_filter,#numeric_filter,,#text_filter,</param>";
    $strXML .= "</call>";
    $strXML .= "</beforeInit>";

I want to know how can I set the values

- greater than (like: ">100"),
- less than (like: "<100"),
- equel to (like "=100" or "100"),
- range (like "10..100")

for the numeric filters?


Answer posted by Support on Apr 03, 2009 07:39
Sorry, but I'm not sure that fully understood your question.
Do you mean, that you need to set some value in filter input from the script?

In case of grid 2.1

grid.getFilterElement(index).value=">100";
grid.filterByAll();

where index - index of related column
Answer posted by pepys on Apr 03, 2009 07:50
I have a column with numeric values in my grid, and I want to have a combo filter in header with some options like these:

- greater than (like: ">100"),
- less than (like: "<100"),
- equel to (like "=100" or "100"),
- range (like "10..100")

And, I want to know how can I set in my XML file these values for the combo filter. Thanks again..


Answer posted by Support on Apr 03, 2009 09:38
Unfortunately numeric filtering limited to the "#numeric_filter" and can't be easily converted to select-like visual mode.
You can place your own select in header and call filterBy with necessary parameters from onchange event of selectbox. ( you can use filtering function instead of constant , as second parameter, so any kind of rules can be defined )