Hello,
I am try to block a expand column in pivot grid, in this example I especify the column with name: "Country" with property expand = false, but on the grid to allow expand this column (the property don't work):
<!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/pivotgrid/remote-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>
<div id="example">
<div id="configurator"></div>
<div id="pivotgrid"></div>
<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: false }, { name: "CompanyName" } ],
rows: [{ name: "ContactTitle", expand: true }],
measures: ["Contacts Count"]
}
}).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>
Source code: http://dojo.telerik.com/ENAyO
How I can block the expand option of the colum or row on the pivot grid?
Thanks.
I am try to block a expand column in pivot grid, in this example I especify the column with name: "Country" with property expand = false, but on the grid to allow expand this column (the property don't work):
<!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/pivotgrid/remote-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>
<div id="example">
<div id="configurator"></div>
<div id="pivotgrid"></div>
<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: false }, { name: "CompanyName" } ],
rows: [{ name: "ContactTitle", expand: true }],
measures: ["Contacts Count"]
}
}).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>
Source code: http://dojo.telerik.com/ENAyO
How I can block the expand option of the colum or row on the pivot grid?
Thanks.