Resizing Column

24 May 20191 minute to read

Allows you to change the column width by holding and dragging the column border using the mouse pointer.

Column width based on size

The enableColumnResizing property adjusts the width of each column based on size of the widget.

  • HTML
  • <div id="PivotGrid1"></div>
    
    <script>
        $(function() {
            $("#PivotGrid1").ejPivotGrid({
                //...
                enableColumnResizing : true
            });
        });
    </script>

    Column width based on text

    The resizeColumnsToFit property automatically adjusts the width of each column based on the maximum content length available in the respective column.

  • HTML
  • <div id="PivotGrid1"></div>
    
    <script>
        $(function() {
            $("#PivotGrid1").ejPivotGrid({
                //...
                resizeColumnsToFit: true
            });
        });
    </script>

    Column resizing in JavaScript pivot grid control