New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring GridColumnMenuSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class GridColumnMenuSettingsBuilder<T> where T : class

Inheritance: objectGridColumnMenuSettingsBuilder<T>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the GridColumnMenuSettingsBuilder<T> class.

C#
public GridColumnMenuSettingsBuilder(GridColumnMenuSettings<T> container)
Parameters:containerGridColumnMenuSettings<T>

Properties

Gets or sets the Container.

C#
protected GridColumnMenuSettings<T> Container { get; }

Methods

Specifies the adaptive rendering of the component.

C#
public GridColumnMenuSettingsBuilder<T> AdaptiveMode(AdaptiveMode value)
Parameters:valueAdaptiveMode

The value for AdaptiveMode

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.

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.

C#
public GridColumnMenuSettingsBuilder<T> AutoSize()
Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.

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.

C#
public GridColumnMenuSettingsBuilder<T> AutoSize(bool value)
Parameters:valuebool

The value for AutoSize

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.

If set to true, the global column menu will render a button to allow the user to clear all filters applied to the grid.

C#
public GridColumnMenuSettingsBuilder<T> ClearAllFilters()
Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.

If set to true, the global column menu will render a button to allow the user to clear all filters applied to the grid.

C#
public GridColumnMenuSettingsBuilder<T> ClearAllFilters(bool value)
Parameters:valuebool

The value for ClearAllFilters

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.

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.

C#
public GridColumnMenuSettingsBuilder<T> Columns(Action<GridColumnMenuColumnsSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridColumnMenuColumnsSettingsBuilder<T>>

The GridColumnMenuColumnsSettingsBuilder<T> for the columns setting.

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current instance of GridColumnMenuSettingsBuilder<T> .

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.

C#
public GridColumnMenuSettingsBuilder<T> Columns(bool enabled)
Parameters:enabledbool

Enables or disables the columns option.

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current instance of GridColumnMenuColumnsSettingsBuilder<T> .

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..

C#
public GridColumnMenuSettingsBuilder<T> ComponentType(string value)
Parameters:valuestring

The value for ComponentType

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.

Enables/disables header column menu.

C#
public GridColumnMenuSettingsBuilder<T> Enabled(bool value)
Parameters:valuebool

If true, enables the header column menu.

Returns:

GridColumnMenuSettingsBuilder<T>

The Enabled method is useful when you need to enable column menu based on certain conditions.

Example:
C#
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu =&gt; menu.Enabled((bool)ViewData["enableColumnMenu"]))
)

If set to true the column menu would allow the user to filter the grid. By default the column menu allows the user to filter if filtering is enabled via the filterable.

C#
public GridColumnMenuSettingsBuilder<T> Filterable(bool value)
Parameters:valuebool

The value for Filterable

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.

Enables you to define custom messages in grid column menu.

C#
public GridColumnMenuSettingsBuilder<T> Messages(Action<GridColumnMenuMessagesBuilder> configurator)
Parameters:configuratorAction<GridColumnMenuMessagesBuilder>Returns:

GridColumnMenuSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu(menu =&gt; menu.Messages(msg =&gt; msg.Filter("Custom filter message")))
)

If set to true the column menu would allow the user to sort the grid by the column field. By default the column menu allows the user to sort if sorting is enabled via the sortable option.

C#
public GridColumnMenuSettingsBuilder<T> Sortable(bool value)
Parameters:valuebool

The value for Sortable

Returns:

GridColumnMenuSettingsBuilder<T>

Returns the current GridColumnMenuSettingsBuilder<T> instance.