URL to the remote data source.
String or Object, default = ''
If the .url property is defined, then every time the grid needs to refresh, search, or sort records, they will be pulled from the .url. If grid needs to save the records, new changes will be submitted to this .url as well.
URL can be defined during object creation: $('#grid').w2grid({ name : 'grid', url : 'server/side/path/to/records', 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' } ] }); You may define different URLs for different operations (get records, delete records, save records) $('#grid').w2grid({ name : 'grid', url : { get : 'server/side/path/to/records', remove : 'server/side/path/to/remove', save : 'server/side/path/to/save' }, 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' } ] }); URL can be defined during run-time: w2ui['layout'].url = 'server/side/path/to/records'; w2ui['layout'].reload(); If you do not specify any .url, then the assumed data source is local. You can add/remove records, user can search and sort records and all actions will be performed locally. You can optionally use .load() method to load records from the server without switching grid to remote data source.
See grid overview page for data structured passed to and from server side url.