columnHeaderTemplate String|Function
The template which renders the content of the column header cell. By default it renders the caption of the tuple member.
The fields which can be used in the template are:
- member - the member of the corresponding column header cell
- tuple - the tuple of the corresponding column header cell
For information about the tuple structure check this link.
Example - emphasize the title of a specific member
<div id="pivotgrid"></div>
<script id="columnTemplate" type="text/x-kendo-template">
# if (member.name === "[Date].[Calendar].[Year].&[2005]") { #
<em>#: member.caption #</em>
# } else { #
#: member.caption #
# } #
</script>
<script>
$("#pivotgrid").kendoPivotGridV2({
columnHeaderTemplate: $("#columnTemplate").html(),
dataSource: {
type: "xmla",
columns: [{ name: "[Date].[Calendar]", expand: true } ],
measures: ["[Measures].[Internet Sales Amount]"],
transport: {
connection: {
catalog: "Adventure Works DW 2008R2",
cube: "Adventure Works"
},
read: 'https://demos.telerik.com/olap/msmdpump.dll'
}
}
});
</script>