Prepares and submits request to the server.
request(cmd, [params, [url, [callBack]]])

cmd | string, name of the command
params | object, map of additional parameters to submit to the server (optional)
url | string, server url of the request (optional)
callBack | function, call back function (optional)

Returns undefined.

#### Description

Prepares and submits request to the server by calling the .url with cmd command. This method is used internally, but can also be used any time during run-time.
The first parameter cmd can be one of the following:

- get-records
- delete-records
- save-records

The second optional argument params is the map of additional properties to submit to the server. This method will already submit grid's state such as searchData, sortData, postData, which you do not need to include again. The third optional argument url defines the url where to submit the request, if it is different from the .url property.
This method emits onRequest event.
If you have grid defined in the following way: $('#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: 'Start Date', size: '120px' }, { 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 do the following: w2ui['grid'].request('change-state');