Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Created June 23, 2015 07:44
Show Gist options
  • Save lohithgn/68348735b3d32d0d8644 to your computer and use it in GitHub Desktop.
Save lohithgn/68348735b3d32d0d8644 to your computer and use it in GitHub Desktop.
<script>
$(document).ready(function () {
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
columnWidth: 120,
height: 570,
dataSource: {
type: "odata",
transport: {
read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
},
schema: {
cube: {
dimensions: {
ContactName: { caption: "All Contacts" },
CompanyName: { caption: "All Companies" },
Country: { caption: "All Countries" },
ContactTitle: { caption: "All Titles" }
},
measures: {
"Contacts Count": { field: "CustomerID", aggregate: "count" }
}
}
},
columns: [{ name: "Country", expand: true }, { name: "CompanyName" } ],
rows: [{ name: "ContactTitle", expand: true }],
measures: ["Contacts Count"]
}
}).data("kendoPivotGrid");
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment