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

Defines the fluent API for configuring GridContextMenu

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class GridContextMenuBuilder

Inheritance: objectGridContextMenuBuilder

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

Constructors

GridContextMenuBuilder method.

C#
public GridContextMenuBuilder(GridContextMenuSettings container)
Parameters:containerGridContextMenuSettings

Properties

Gets the settings being configured.

C#
protected GridContextMenuSettings Container { get; }

Methods

Configures the context menu commands for the grid body.

C#
public GridContextMenuBuilder Body(Action<GridContextMenuCommandFactory> configurator)
Parameters:configuratorAction<GridContextMenuCommandFactory>

The action to configure the context menu commands.

Returns:

GridContextMenuBuilder

The current GridContextMenuBuilder instance for method chaining.

Configures the client-side events.

C#
public GridContextMenuBuilder Events(Action<GridContextMenuEventBuilder> configurator)
Parameters:configuratorAction<GridContextMenuEventBuilder>

The client events action.

Returns:

GridContextMenuBuilder

The current GridContextMenuBuilder instance for method chaining.

Example:
C#
@(Html.Kendo().ContextMenu()
.Name("ContextMenu")
.Events(events =&gt; events
.Close("onClose")
)
)

Configures the context menu commands for the grid groups.

C#
public GridContextMenuBuilder Groups(Action<GridContextMenuCommandFactory> configurator)
Parameters:configuratorAction<GridContextMenuCommandFactory>

The action to configure the context menu commands.

Returns:

GridContextMenuBuilder

The current GridContextMenuBuilder instance for method chaining.

Configures the context menu commands for the grid head.

C#
public GridContextMenuBuilder Head(Action<GridContextMenuCommandFactory> configurator)
Parameters:configuratorAction<GridContextMenuCommandFactory>

The action to configure the context menu commands.

Returns:

GridContextMenuBuilder

The current GridContextMenuBuilder instance for method chaining.