sortable Boolean|Object
(default: false)
If set to true
the user could sort the pivotgrid by clicking the dimension fields. By default sorting is disabled.
Can be set to a JavaScript object which represents the sorting configuration.
Example - enable sorting
<div id="pivotgrid"></div>
<script>
$("#pivotgrid").kendoPivotGrid({
height: 550,
sortable: true,
dataSource: {
type: "xmla",
columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
rows: [{ name: "[Product].[Product]" }],
measures: ["[Measures].[Internet Sales Amount]"],
transport: {
connection: {
catalog: "Adventure Works DW 2008R2",
cube: "Adventure Works"
},
read: {
url: "https://demos.telerik.com/olap/msmdpump.dll",
dataType: "text",
contentType: "text/xml",
type: "POST"
}
},
schema: {
type: "xmla"
}
}
});
</script>
sortable.allowUnsort Boolean
(default: true)
If set to true
the user can get the pivotgrid in unsorted state by clicking the sorted dimension field.
Example - disable unsorting
<div id="pivotgrid"></div>
<script>
$("#pivotgrid").kendoPivotGrid({
height: 550,
sortable: {
allowUnsort: false
},
dataSource: {
type: "xmla",
columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
rows: [{ name: "[Product].[Product]" }],
measures: ["[Measures].[Internet Sales Amount]"],
transport: {
connection: {
catalog: "Adventure Works DW 2008R2",
cube: "Adventure Works"
},
read: {
url: "https://demos.telerik.com/olap/msmdpump.dll",
dataType: "text",
contentType: "text/xml",
type: "POST"
}
},
schema: {
type: "xmla"
}
}
});
</script>