kendo ui - Why pagination is not applied to grid when using common data source -
i referred kendo articles , did goggling ,but couldn't found solution. step 1:
is possible when using common data source , binding whole data chart , grid pagination happen when page loading.
step 2:
later on based on filter condition applied on grid data in chart should change.
any or suggest me whether possible or not..
var common = new kendo.data.datasource({ type : "odata", transport: { read: "http://demos.kendoui.com/service/northwind.svc/orders" }, schema : { model: { fields: { orderdate: { type: "date" } } } } }); common.read(); var grid = $("#grid").kendogrid({ datasource: common, pagesize : 10, pageable : { refresh : true, pagesizes: [10, 20] }, filterable:true, columns : [ { field : "orderid", filterable: false }, "freight", { field : "orderdate", title : "order date", width : 100, format: "{0:mm/dd/yyyy}", filterable: true }, { field: "shipname", title: "ship name", width: 200, filterable: true }, { field: "shipcity", title: "ship city", filterable: true } ] }).data("kendogrid"); $("#chart").kendochart({ datasource : common, autobind : false, categoryaxis: { field: "orderid" }, legend : { position: "right", visible: true }, seriesdefaults: { type: "area" }, series : [ { field: "orderdate", name: "orderdate" }, { field: "freight", name: "freight" }, { field: "shipvia", name: "shipvia" } ], valueaxis : [ { name : "orderid", max : 5.0, min : 0, labels : { format: "{0}" }, tooltip: { visible: true } } ] });
here fiddle have tested : http://jsfiddle.net/d3rsk/189/
the grid doesn't have pagesize option. need set page size in data source configuration:
var common = new kendo.data.datasource({ pagesize : 10, type : "odata", transport: { read: "http://demos.kendoui.com/service/northwind.svc/orders" }, schema : { model: { fields: { orderdate: { type: "date" } } } } });
here updated jsfiddle: http://jsfiddle.net/d3rsk/192/
Comments
Post a Comment