Skip to content

Instantly share code, notes, and snippets.

@goofmint

goofmint/index.js

Created Sep 21, 2016
Embed
What would you like to do?
5.md
var dataSource = datagrid.createDataSource({
idProperty: 'id',
type: 'ajax',
param: {
ajax: dumyAjax,
search: {
request: function(param) {
return {
type: 'search',
param: param
};
},
response: function(result) {
return result;
}
},
fetch: {
request: function(param, range) {
return {
type: 'fetch',
param: param,
range: range
};
},
response: function(result) {
return result;
}
},
find: {
request: $.noop,
response: $.noop
},
commit: {
request: function(edit) {
return {
type: 'commit',
edit: edit.getReplacedDataSet()
};
},
response: $.noop
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment