GridColumnMenuSettingsBuilder
Methods
AutoSize(System.Boolean)
If set to 'true', the column menu would allow the user to fit one or all columns to the width of their content. This setting is available only when the tabbed componentType is used.
Parameters
value - System.Boolean
The value for AutoSize
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.ComponentType("tabbed").AutoSize((bool)ViewData["autoSize"]))
)
AutoSize()
If set to 'true', the column menu would allow the user to fit one or all columns to the width of their content. This setting is available only when the tabbed componentType is used.
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.ComponentType("tabbed").AutoSize((bool)ViewData["autoSize"]))
)
Enabled(System.Boolean)
Enables/disables header column menu.
Parameters
value - System.Boolean
If true, enables the ColumnMenu.
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.Enabled((bool)ViewData["enableColumnMenu"]))
)
Sortable(System.Boolean)
Enables/disables sort section in header column menu.
Parameters
value - System.Boolean
If true, enables sorting.
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.Sortable((bool)ViewData["enableSort"]))
)
Filterable(System.Boolean)
Enables/disables filter section in header column menu.
Parameters
value - System.Boolean
If true, enables filtering.
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.Filterable((bool)ViewData["enableFilter"]))
)
Columns(System.Boolean)
Enables/disables columns section in header column menu.
Parameters
value - System.Boolean
If true, enables the columns section in the column menu
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.Columns((bool)ViewData["enableColumns"]))
)
Columns(System.Action)
If set to 'true', the column menu would allow the user to select (show and hide) grid columns. By default, the column menu allows column selection.
Parameters
configurator - System.Action<GridColumnMenuColumnsSettingsBuilder>
The configurator for the columns setting.
Messages(System.Action)
Enables you to define custom messages in grid column menu.
Parameters
configurator - System.Action<ColumnMenuMessagesBuilder>
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.Messages(msg => msg.Filter("Custom filter message")))
)
ComponentType(System.String)
Specifies the component type of the column menu. "classic" - Uses the standard rendering of the column menu.; "modern" - Uses new rendering with a fresh and modern look and feel. or "tabbed" - Uses the rendering of the "modern" menu, but splits its content into different tabs..
Parameters
value - System.String
The value for ComponentType
ClearAllFilters(System.Boolean)
If set to 'true', the global column menu will render a button to allow the user to clear all filters applied to the grid.
Parameters
value - System.Boolean
The value for ClearAllFilters
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.ClearAllFilters(true))
)
ClearAllFilters()
If set to 'true', the global column menu will render a button to allow the user to clear all filters applied to the grid.
Example
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu => menu.ClearAllFilters(true))
)