Finds and returns matched records.
find(match, [returnIndex])

match | object, set of properties to match
returnIndex | boolean, if true returns index of matched records

Returns an array of objects or an array of integers or an empty array.

#### Description

This method returns an array of record objects or an array of recids for all matched records. The match argument is a JavaScript object with key-value pairs. It will match this pairs with the items in the records array. For example, if match = { type: 1, status: 'Open' } then it will return all records where type is 1 and status is 'Open.' If you have following grid: $('#grid').w2grid({ name : 'grid', 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: 'End Date', size: '120px' } ], 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' } ] }); You can find var recs = w2ui['grid'].find({ email: 'jdoe@gmail.com' }); console.log(recs);