Edit this page

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").kendoPivotGrid({
    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: {
                url: "https://demos.telerik.com/olap/msmdpump.dll",
                dataType: "text",
                contentType: "text/xml",
                type: "POST"
            }
        },
        schema: {
            type: "xmla"
        }
    }
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy