I see most of the filter functions want a column, what is the best method to search all columns in the grid for a particular string then display only the rows that match? Highlighting the rows may also work but most importantly I have up to 20 columns in a grid and need to search all of them.
you need to create a custom filter.
You can find the ready code for a required filter here:
docs.dhtmlx.com/doku.php?id=dhtm … of_filters
I got this to work when adding a input text in the index.html but having trouble linking it to a toolbar input.
toolbar1.addInput(“input_search”, 15, “”, 100);
grid1.makeFilter(“input_search”,0);
but then grid1.getFilterElement(0) is null
Please, try to use the following code:
toolbar1.addInput("input_search", 15, "", 100);
var inp=toolbar1.getInput("input_search");
grid1.makeFilter("inp",0);
Thanks that worked, the “inp” parameter does not need the quotes since its not using the string value but the documentation only used strings so I wasn’t sure non-strings even worked.
I apologize for my mistake.
Of course the “inp” parameter does not need the quotes.
Thank you.
toolbar1.addInput("input_search", 15, "", 100);
var inp=toolbar1.getInput("input_search");
grid1.makeFilter(inp,0);