jquery - kendo grid can't show number record -
""" kendo ui grid """
my grid can't show number record , total page , next page
grid footer show "no items display"
prev , next symbol << < 0 > >>
i put pageable or pagesize why don't show t_t
please me !!!
var datasourceuser = new kendo.data.datasource({ transport: { read: "adminuser.php?action=view", destroy: { url: function (options) { $.ajax( { type: 'post', url: 'adminuser.php?action=delete', data: { userid: options.userid }, complete: function(e) { $("#griduser").data("kendogrid").datasource.read(); } }); return; }, datatype : "json" }, create: { url: function (options) { $.ajax( { type: 'post', url: 'adminuser.php?action=create', data: { username: options.username, password: options.password, pcuid: options.pcuid, adp_id: options.adp_id }, complete: function(e) { $("#griduser").data("kendogrid").datasource.read(); } }); return; }, datatype : "json" }, update: { url: function (options) { $.ajax( { type: 'post', url: 'adminuser.php?action=update', data: { userid: options.userid, username: options.username, password: options.password, pcuid: options.pcuid, adp_id: options.adp_id }, complete: function(e) { $("#griduser").data("kendogrid").datasource.read(); } }); return; }, datatype : "json" }, parametermap: function(options, operation) { if (operation !== "read") { return {models: kendo.stringify(options.models)}; } return options; } }, batch: false, pagesize: 15, schema: { data: "data", model: { id: "userid", fields: { userid: { editable: false, nullable: true }, username: { validation: { required: true } }, password: { validation: { required: true } }, pcuid: { validation: { required: true } }, adp_id: { validation: { required: true } } } } } }); $("#griduser").kendogrid({ datasource: datasourceuser, pageable: true, toolbar: ["create"], pageable: true, columns: [ { field:"userid", title: "userid", width: "100px" }, { field:"username", title: "username", width: "100px" }, { field:"password", title: "password", width: "200px" }, { field:"pcuid", title: "pcuid", width: "100px" }, { field:"adp_id", title: "adp_id", width: "200px" }, { command: ["edit", "destroy"], title: " ", width: "160px" }], editable: "popup" });
adminuser.php
{"data":[{"userid":"1","username":"test1","password":"1234","pcuid":"001","adp_id":"1"},{"userid":"2","username":"test2","password":"1234","pcuid":"002","adp_id":"2"}]}
in situations need @ network traffic. in chrome press f12 , go network tab.
once there (different depending on browser) should see request "adminuser.php?action=view", result json data requested.
based on settings expecting:
{ data: [ { userid: 123, username: 'abc', password: 'abc', pcuid: 123, adp_ip: 123 }, { userid: 456, username: 'abc', password: 'abc', pcuid: 123, adp_ip: 123 } ] }