The Property "expand: false" don't work

2 posts, 0 answers
  1. Gus
    Gus avatar
    29 posts
    Member since:
    Jan 2015

    Posted 23 Feb 2015 Link to this post


    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>
        <base href="">
        <style>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</style>
        <link rel="stylesheet" href="" />
        <link rel="stylesheet" href="" />
        <link rel="stylesheet" href="" />
        <link rel="stylesheet" href="" />

        <script src=""></script>
        <script src=""></script>
    <div id="example">
        <div id="configurator"></div>
        <div id="pivotgrid"></div>

            $(document).ready(function () {
                var pivotgrid = $("#pivotgrid").kendoPivotGrid({
                    columnWidth: 120,
                    height: 570,
                    dataSource: {
                        type: "odata",
                        transport: {
                            read: ""
                        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"]

                    dataSource: pivotgrid.dataSource,
                    height: 570
                display: inline-block;
                vertical-align: top;
                width: 70%;

                display: inline-block;
                vertical-align: top;


    Source code: 

    How I can block the expand  option of the colum or row on the pivot grid?


  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 25 Feb 2015 Link to this post

    Hello Gustavo,

    The expand option says whether the root dimension should be expanded on initial load or not.
    To prevent dimension expand, you will need to wire the expandMember event and prevent the default action when it is needed. Check the updated Dojo demo.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top