hello,
I am use this example http://dojo.telerik.com/AZamu/2, with local binding I was modify to sort and filter and it don't work, this is my code:
<!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/pivotgrid/local-flat-data-binding">
<style>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.common.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.default.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.default.min.css" />
<script src="http://cdn.kendostatic.com/2014.3.1411/js/jquery.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.3.1411/js/kendo.all.min.js"></script>
</head>
<body>
<script src="../content/shared/js/products.js"></script>
<div id="example">
<div id="configurator"></div>
<div id="pivotgrid"></div>
<script>
$(document).ready(function () {
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
columnWidth: 120,
height: 570,
filterable: true,
sortable: true,
dataSource: {
data: products,
schema: {
model: {
fields: {
ProductName: { type: "string" },
UnitPrice: { type: "number" },
UnitsInStock: { type: "number" },
Discontinued: { type: "boolean" },
CategoryName: { field: "Category.CategoryName" }
}
},
cube: {
dimensions: {
ProductName: { caption: "All Products" },
CategoryName: { caption: "All Categories" },
Discontinued: { caption: "Discontinued" }
},
measures: {
"Sum": { field: "UnitPrice", format: "{0:c}", aggregate: "sum" },
"Average": { field: "UnitPrice", format: "{0:c}", aggregate: "average" }
}
}
},
columns: [{ name: "CategoryName", expand: true }, { name: "ProductName" } ],
rows: [{ name: "Discontinued", expand: true }],
measures: ["Sum"]
}
}).data("kendoPivotGrid");
$("#configurator").kendoPivotConfigurator({
dataSource: pivotgrid.dataSource,
height: 570
});
});
</script>
<style>
#pivotgrid
{
display: inline-block;
vertical-align: top;
width: 70%;
}
#configurator
{
display: inline-block;
vertical-align: top;
}
</style>
</div>
</body>
</html>
Why It don't work wiht local bind?
Thanks.
I am use this example http://dojo.telerik.com/AZamu/2, with local binding I was modify to sort and filter and it don't work, this is my code:
<!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/pivotgrid/local-flat-data-binding">
<style>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.common.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.default.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.default.min.css" />
<script src="http://cdn.kendostatic.com/2014.3.1411/js/jquery.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.3.1411/js/kendo.all.min.js"></script>
</head>
<body>
<script src="../content/shared/js/products.js"></script>
<div id="example">
<div id="configurator"></div>
<div id="pivotgrid"></div>
<script>
$(document).ready(function () {
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
columnWidth: 120,
height: 570,
filterable: true,
sortable: true,
dataSource: {
data: products,
schema: {
model: {
fields: {
ProductName: { type: "string" },
UnitPrice: { type: "number" },
UnitsInStock: { type: "number" },
Discontinued: { type: "boolean" },
CategoryName: { field: "Category.CategoryName" }
}
},
cube: {
dimensions: {
ProductName: { caption: "All Products" },
CategoryName: { caption: "All Categories" },
Discontinued: { caption: "Discontinued" }
},
measures: {
"Sum": { field: "UnitPrice", format: "{0:c}", aggregate: "sum" },
"Average": { field: "UnitPrice", format: "{0:c}", aggregate: "average" }
}
}
},
columns: [{ name: "CategoryName", expand: true }, { name: "ProductName" } ],
rows: [{ name: "Discontinued", expand: true }],
measures: ["Sum"]
}
}).data("kendoPivotGrid");
$("#configurator").kendoPivotConfigurator({
dataSource: pivotgrid.dataSource,
height: 570
});
});
</script>
<style>
#pivotgrid
{
display: inline-block;
vertical-align: top;
width: 70%;
}
#configurator
{
display: inline-block;
vertical-align: top;
}
</style>
</div>
</body>
</html>
Why It don't work wiht local bind?
Thanks.