New to Kendo UI for Angular? Start a free 30-day trial
ColumnMenuAutoSizeAllColumnsComponent
Represents the column-menu item for resizing all columns to the minimum possible width so that they fit the widest header or cell content without wrapping. See example.
Place this component inside a ColumnMenuTemplate
directive.
To register it as a column menu item, set the ColumnMenuService
passed by
the template to the service
input of the kendo-grid-columnmenu-autosize-all-columns
component. See example.
html
<kendo-grid [columnMenu]="true" ...>
<ng-template kendoGridColumnMenuTemplate let-service="service">
<kendo-grid-columnmenu-autosize-all-columns [service]="service">
</kendo-grid-columnmenu-autosize-all-columns>
</ng-template>
</kendo-grid>
html
<kendo-grid-column field="ProductName">
<ng-template kendoGridColumnMenuTemplate let-service="service">
<kendo-grid-columnmenu-autosize-all-columns [service]="service">
</kendo-grid-columnmenu-autosize-all-columns>
</ng-template>
</kendo-grid-column>
Selector
kendo-grid-columnmenu-autosize-all-columns
Inputs
Name | Type | Default | Description |
---|---|---|---|
service |
|
Represents the |
Methods
autoSizeAllColumns |
---|
Resizes all columns to the minimum possible width so that they fit the widest header or cell content without wrapping. |