Guest User

Untitled

a guest
Jun 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. var sampleDataSource = new kendo.data.DataSource({
  2. transport: {
  3. read: {
  4. url: svcSampleUrl,
  5. contentType: "application/json; charset=utf-8",
  6. type: "POST",
  7. dataType: "json"
  8. },
  9. parameterMap: function (options) {
  10. model.Take = options.take;
  11. model.Skip = options.skip;
  12. model.Sort = options.sort;
  13. model.Filter = options.filter;
  14. return kendo.stringify(model);
  15. }
  16. },
  17. schema: {
  18. data: "sampleDTOList",
  19. // another way to accept the response if some particular values need processing
  20. //data: function (response) {
  21. // //some implementation with the response values
  22. // return response.sampleDTOList;
  23. //},
  24. total: "totalItems",
  25. model: {
  26. fields: {
  27. ID: { type: "number" },
  28. Label: { type: "string" },
  29. Description: { type: "string" }
  30. }
  31. }
  32. },
  33. serverPaging: true,
  34. serverFiltering: true,
  35. serverSorting: true,
  36. pageSize: 10,
  37. });
Add Comment
Please, Sign In to add comment