New to Kendo UI for AngularStart a free 30-day trial

ColumnMenuAutoSizeColumnComponent

Represents the column-menu item for resizing the specified column to the minimum possible width so that it fits the header or cell content without wrapping. See example.

Place this component inside a ColumnMenuTemplate directive. Set the ColumnMenuService and column passed by the template to the service and column inputs of the kendo-grid-columnmenu-autosize-column component.

html
<kendo-grid [columnMenu]="true" ...>
  <ng-template kendoGridColumnMenuTemplate let-service="service" let-column="column">
    <kendo-grid-columnmenu-autosize-column [column]="column" [service]="service">
    </kendo-grid-columnmenu-autosize-column>
  </ng-template>
</kendo-grid>
html
<kendo-grid-column field="ProductName">
  <ng-template kendoGridColumnMenuTemplate let-service="service">
    <kendo-grid-columnmenu-autosize-column [column]="column" [service]="service">
    </kendo-grid-columnmenu-autosize-column>
  </ng-template>
</kendo-grid-column>

Selector

kendo-grid-columnmenu-autosize-column

Inputs

NameTypeDefaultDescription

column

any

Specifies the Grid column instance to resize with the auto size column option.

service

ColumnMenuService

Represents the ColumnMenuService class. This input is required.

Methods

autoSizeColumn

Resizes the specified column to the minimum possible width so that it fits the widest header or cell content without wrapping.

In this article
SelectorInputsMethods
Not finding the help you need?
Contact Support