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

Provides a fluent interface for configuring Grid custom action commands.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

The type of the data model.

Syntax:

C#
public class GridCustomActionCommandBuilder<T> : GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>> where T : class

Inheritance: objectGridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>GridCustomActionCommandBuilder<T>

Inherited Members GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.Template(string)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.Template<T>(TemplateBuilder<T>)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.TemplateId(string)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.TemplateView(MvcHtmlString)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.TemplateHandler(string)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.Text(string)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.IconClass(string)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.HtmlAttributes(object)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.HtmlAttributes(IDictionary<string, object>)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.HtmlAttributes(string)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.Visible(Func<object, object>)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.Visible(string)GridActionCommandBuilderBase<GridCustomActionCommand<T>, GridCustomActionCommandBuilder<T>>.Commandobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public GridCustomActionCommandBuilder(GridCustomActionCommand<T> command)
Parameters:commandGridCustomActionCommand<T>

Methods

Sets the controller action that will be executed when the custom action command is invoked.

C#
public GridCustomActionCommandBuilder<T> Action(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

The name of the action method.

controllerNamestring

The name of the controller.

routeValuesobject

An anonymous object containing additional route values to include in the action URL.

Returns:

GridCustomActionCommandBuilder<T>

Sets the controller action that will be executed when the custom action command is invoked.

C#
public GridCustomActionCommandBuilder<T> Action(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

The name of the action method.

controllerNamestring

The name of the controller.

routeValuesRouteValueDictionary

Additional route values to include in the action URL.

Returns:

GridCustomActionCommandBuilder<T>

Sets the controller action that will be executed when the custom action command is invoked.

C#
public GridCustomActionCommandBuilder<T> Action(string actionName, string controllerName)
Parameters:actionNamestring

The name of the action method.

controllerNamestring

The name of the controller.

Returns:

GridCustomActionCommandBuilder<T>

Sets the click handler for the custom action command using a delegate function.

C#
public GridCustomActionCommandBuilder<T> Click(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The delegate function that will be executed when the command is clicked.

Returns:

GridCustomActionCommandBuilder<T>

Sets the name of the JavaScript function that will be executed when the custom action command is clicked.

C#
public GridCustomActionCommandBuilder<T> Click(string handler)
Parameters:handlerstring

The name of the JavaScript function to execute on click.

Returns:

GridCustomActionCommandBuilder<T>

Configures the data route values that will be sent with the custom action command.

C#
public GridCustomActionCommandBuilder<T> DataRouteValues(Action<GridDataKeyFactory<T>> factory)
Parameters:factoryAction<GridDataKeyFactory<T>>

The factory method that configures which data keys from the current row will be included as route values.

Returns:

GridCustomActionCommandBuilder<T>

Sets whether the data keys of the current row should be sent when the custom action command is executed.

C#
public GridCustomActionCommandBuilder<T> SendDataKeys(bool value)
Parameters:valuebool

If true, data keys will be sent; otherwise, they will not be included.

Returns:

GridCustomActionCommandBuilder<T>

Sets whether the current state of the grid (sorting, filtering, paging) should be sent when the custom action command is executed.

C#
public GridCustomActionCommandBuilder<T> SendState(bool value)
Parameters:valuebool

If true, grid state will be sent; otherwise, it will not be included.

Returns:

GridCustomActionCommandBuilder<T>