Adds a search or searches to the grid.
addSearch([before], search)
before |
string or integer, optional, search to add before |
search |
object or array, search(s) to add |
Returns integer.
Description
Adds a search or searches to the grid by adding items into
.searches array. Since the
search popup is shown when user clicks the search button, there is no need to refresh the grid. The first optional argument
before is the search to insert before. It can be either a search field name or the index in
the
.searches array. If first parameter is not defined, the search will be appended
to the end. Second argument
search is the search object or an array of search objects.
Returns the number of searches it adds.
If you define grid as:
You can add searches by:
or several at a time:
See
.searches array for the structure of the search object.