Locks the grid.
lock(message, [showSpinner])

message | string, message
showSpinner | boolean, optional, spinner indicator

Returns undefined.

#### Description

This method will lock the grid by added a semi-transparent div on top of its content. The user will not be able to interact with the grid or its content until the grid is unlocked with .unlock(). This method will call w2utils.lock() to perform the locking.
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 have 3 options how you want to lock the content.
Lock with a message and a spinner: w2ui.grid.lock('Loading...', true); Lock w/o a message, but with a spinner: w2ui.grid.lock('', true); Lock w/o a message and w/o a spinner: w2ui.grid.lock('');