Pagination using kendo grid does not work on page load -




in js. loading data using kendogridoptions. have mapped data source fetches records. have configured pageable = true. noticed when page load pagination option not available become available on when sort 1 of columns. following configuration of grid , data source

var enhancedgridoptions = mydatakendogridmanager.kendogridoptions({

        datasource: mygriddatasource,         sortable: true,         scrollable: true,         editable:false,         resizable: true,         reorderable: true,         pageable: true,         columnresize: function (e) {             adjustlastcolumn(e, this);         },         columns:             [                 {                     field: "dealtype",                     title: $.i18n.prop('buytype.label'),                     width: "108px"                 },                 {                     field: "mystatus",                     title: $.i18n.prop('mystatus.label'),                     width: "105px"                 },                 {                     field: "action",                     title: $.i18n.prop('action.label'),                     width: "105px"                 },               ],         pdf:         {             filename: "my_list_" + (new date()).tostring(myformat + "_hh:mm") + ".pdf",             allpages: true,         },         excel:         {             filename: "my_list_" + (new date()).tostring(myformat + "_hh:mm") + ".xlsx",             allpages: true,         }      } 

and data source configured below

 transport: {                 read: function (e) {                     myapi.rootget("data/mylist?dealid=" + id, function (response) {                         var data;                        // console.log(response.data)                         if (_.isstring(response.data)) {                             response.data = json.parse(response.data);                             data = response.data;                             settimeout(function () {                                 e.success(data);                             }, 10000);                         }                         else {                             e.error("xhr response", response.status, json.parse(response.data));                         }                     });                 },              },                 schema:             {                 model: {                     id: "id",                     fields: {                         dealtype: {                             type: "string"                         },                         mystatus: {                             type: "string"                         },                         action: {                             type: "string"                         },                      }                 },                 parse:function(data)                 {                     return parsedata(data);                 }              },                 serversorting: false,                 serverfiltering: false,                 serverpaging: false         }; 

appreciate if can guide missing on pagination not work on page load.

thanks, anjana

if getting "nan - nan of 500 items" error @ left bottom corner in grid, should add pagesize in datasource property.

var enhancedgridoptions = mydatakendogridmanager.kendogridoptions({      datasource: {         data: mygriddatasource,         pagesize: 50     },     ....     ....     ....     pageable: {         pagesizes: [20, 30, 50, 100],         buttoncount: 5     } }); 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -