Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
765
how to make my row header column's width fit my content?
posted

Hi experts, I have used defaultRowHeaderWidth, but now all row header columns have the same width. How to set it so that different row header columns have different widths based on their own content width? Thanks in advance.

Parents
No Data
Reply
  • 23953
    Offline posted

    Hello srajagopal,

    There is no out of the box solution for this scenario, but it can be achieved with a private function of the Resizing feature. The solution is to handle the pivotGridRendered event and call "_autoResize" method.

    Here is a code snippet:

    $("#grid").igPivotGrid({

    dataSource: dataSource,

    gridOptions: {

    features: [ {

    name: "Resizing"

    } ]

    },

    pivotGridRendered: function (evt, ui) {

    var columns = $("#" + ui.owner.grid().id()).data("igGrid").options.columns, i;

    for (i = 0; i < columns.length; i++) {

    $("#" + ui.owner.grid().id()).data("igGridResizing")._autoResize(i, true, null);

    }

    }

    });

    Hope this helps,
    Martin Pavlov
    Infragistics, Inc.

Children