Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var sampleDataSource = new kendo.data.DataSource({
- transport: {
- read: {
- url: svcSampleUrl,
- contentType: "application/json; charset=utf-8",
- type: "POST",
- dataType: "json"
- },
- parameterMap: function (options) {
- model.Take = options.take;
- model.Skip = options.skip;
- model.Sort = options.sort;
- model.Filter = options.filter;
- return kendo.stringify(model);
- }
- },
- schema: {
- data: "sampleDTOList",
- // another way to accept the response if some particular values need processing
- //data: function (response) {
- // //some implementation with the response values
- // return response.sampleDTOList;
- //},
- total: "totalItems",
- model: {
- fields: {
- ID: { type: "number" },
- Label: { type: "string" },
- Description: { type: "string" }
- }
- }
- },
- serverPaging: true,
- serverFiltering: true,
- serverSorting: true,
- pageSize: 10,
- });
Add Comment
Please, Sign In to add comment