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: $('#grid').w2grid({ name : 'grid', show : { toolbar : true }, columns : [ { field: 'recid', caption: 'ID', size: '50px' }, { field: 'lname', caption: 'Last Name', size: '30%' }, { field: 'fname', caption: 'First Name', size: '30%' }, { field: 'email', caption: 'Email', size: '40%' }, { field: 'sdate', caption: 'Start Date', size: '120px' }, { field: 'sdate', caption: 'End Date', size: '120px' } ], searches : [ { field: 'recid', caption: 'ID (int)', type: 'int' }, { field: 'id', caption: 'ID (float)', type: 'float' }, { field: 'fname', caption: 'First Name', type: 'text' }, { field: 'lname', caption: 'Last Name', type: 'text' }, { field: 'email', caption: 'Email', type: 'list', options: { items: ['vitali@gmail.com', 'jim@gmail.com'] } }, { field: 'sdate', caption: 'Date', type: 'date' } ] }); Or it can be changed during run-time: w2ui['grid'].searches[0] = { field: 'recid', caption: 'ID', type: 'int' }; 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: search = { type : 'text', // type of the search (see below) field : '', // field name to submit to server caption : '', // caption of the search inTag : '', // text that will be inside <input ...> tag outTag : '', // text that will be outside <input ...> tag hidden : false, // indicates if search is show or hidden options : {} // options for w2field object } The type of the search filed can be one of the following:

- text
- int
- float
- hex
- money
- currency
- percent
- alphanumeric
- date
- time
- list
- combo
- enum

You can control search from JavaScript, see following methods for more information:

- .search() - submit a search
- .searchOpen() - open search dialog
- .searchClose() - close search dialog
- .searchReset() - reset all search fields to default values