kendo grid pagenation count not working on default page load, after clicking button gets updated automatically. how make work on initial load ?
html:
<div id="custgrid" class="col-sm-12 col-md-12 col-lg-12"></div>
script:
$(document).ready(function() { var data = [{"slno":"1","upon":"15-aug-2016","filename":"reconciliation.csv"},{"slno":"2","upon":"14-aug-2016","filename":"report.csv"},{"slno":"3","upon":"12-aug-2016","filename":"reconreport.csv"}]; $('#custgrid').kendogrid({ "columnmenu" : true, "datasource" : data, "filterable" : true, "sortable" : true, "pageable" : true, "columns" : [ { "field" : "slno", "title" : "sl no." }, { "field" : "upon", "title" : "uploaded on" }, { "field" : "filename", "title" : "file name" } ], "scrollable" : {}, "excel" : { "allpages" : true, "filename" : "tasks.xls" } }); });
here working dojo you. http://dojo.telerik.com/ovela
if paging need provide datasource pagesize. per api docs.
all have done expanded out datasource element datasource:data
datasource : { data: data, pagesize: 10, schema: { model: { fields:{ slno: {type:"number"}, upon: {type:"datetime"}, filename: {type:"string"}, } } } },
i find more useful point array gives bit more info of should happening data provided grid.
if need else give me shout.
Comments
Post a Comment