w2grid.searches

Array of search objects.
Array, default = []
The .searches property can be initialized during the object creation or any time during the run-time. There is no need to refresh the grid because this array will be used when user executes a search.
Searches can be defined during object creation: Or it can be changed during run-time: Because the only way for the user to trigger the search is from the toolbar, the .show.toolbar and .show.toolbarSearch properties should be set to true.
Below it the structure of the search object: Initially the default search field is "all", however, you can remove it or define a different search field. To define a different default search you can do the following: To disable "all" search set .show.searchAll to false.
For all possible search operators see .operators. Conversion map from column type to search operator type is defined in .operatorsMap.
The type of the search filed can be one of the following:
  • text
  • int
  • float
  • money
  • currency - same as money
  • percent
  • hex
  • color - same as hex
  • alphanumeric
  • date
  • time
  • datetime
  • list
  • combo
  • enum
You can control search from JavaScript, see following methods for more information:

See Also

operators - default operators for each search type
operatorsMap - default operator for each search type

User Comments

comments powered by Disqus