Called when user applies a search.
onSearch = function(event)
You can add event listener during the object creation: $('#grid').w2grid({ name : 'grid', show : { toolbar : true, }, columns: [ { field: 'recid', caption: 'ID', size: '50px' }, { field: 'lname', caption: 'Last Name', size: '30%', searchable: true }, { field: 'fname', caption: 'First Name', size: '30%', searchable: true }, { field: 'email', caption: 'Email', size: '40%', searchable: true }, { field: 'sdate', caption: 'End Date', size: '120px', searchable: true } ], records: [ { recid: 1, fname: 'John', lname: 'doe', email: 'vitali@gmail.com', sdate: '1/3/2012' }, { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'jdoe@gmail.com', sdate: '2/4/2012' }, { recid: 3, fname: 'Jin', lname: 'Franson', email: '--', sdate: '4/23/2012' }, { recid: 4, fname: 'Susan', lname: 'Ottie', email: 'jdoe@gmail.com', sdate: '5/3/2012' }, { recid: 5, fname: 'Kelly', lname: 'Silver', email: 'jdoe@gmail.com', sdate: '4/3/2012' }, { recid: 6, fname: 'Francis', lname: 'Gatos', email: 'vitali@gmail.com', sdate: '2/5/2012' } ], onSearch: function(event) { console.log(event); } }); or after the object has been created: w2ui.grid.on('search', function(event) { console.log(event); }); An array searchData in eventData with search fields/values will be sent with the event. If you modify this array, it will be applied back to the search.
Your event listener can be executed before or after the event has been processed. You can also cancel the default behavior. See Events page in utilities.