Resizing Column in EJ 1 ASP.NET MVC PivotGrid Control

23 Mar 20211 minute to read

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

Column Width Based on Size

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

  • CSHTML
  • @Html.EJ().Pivot().PivotGrid("PivotGrid1").EnableColumnResizing(true).DataSource(.....)

    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.

  • CSHTML
  • @Html.EJ().Pivot().PivotGrid("PivotGrid1").ResizeColumnsToFit(true).DataSource(.....)
    
    ![Column resizing in ASP NET MVC pivot grid control](Column-Resizing_images/columnresizing.png)