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

GridCustomActionCommandBuilder

Methods

Click(System.Func)

Parameters

handler - System.Func<Object,Object>

Click(System.String)

Parameters

handler - System.String

Action(System.String,System.String,System.Web.Routing.RouteValueDictionary)

Parameters

actionName - System.String
controllerName - System.String
routeValues - System.Web.Routing.RouteValueDictionary

Action(System.String,System.String,System.Object)

Parameters

actionName - System.String
controllerName - System.String
routeValues - System.Object

Action(System.String,System.String)

Parameters

actionName - System.String
controllerName - System.String

SendDataKeys(System.Boolean)

Parameters

value - System.Boolean

SendState(System.Boolean)

Parameters

value - System.Boolean

DataRouteValues(System.Action)

Parameters

factory - System.Action<GridDataKeyFactory>

Template(System.String)

The template of the command column.

Parameters

value - System.String

The value that configures the template.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").Template("Button Template"));
                   }))

TemplateId(System.String)

The template of the command column.

Parameters

value - System.String

The value that configures the template.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").TemplateId("TemplateId"));
                   }))

TemplateView(System.Web.Mvc.MvcHtmlString)

The template of the command column.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").TemplateView(Html.Partial("CommandTemplate")));
                   }))

TemplateHandler(System.String)

Parameters

value - System.String

Text(System.String)

Sets the text displayed by the command. If not set a default value is used.

Parameters

text - System.String

The text which should be displayed

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").Text("Text"));
                   }))

IconClass(System.String)

The class for the web font icon of the button.

Parameters

iconClass - System.String

The class for the web font icon of the button

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").IconClass("k-icon k-i-check"));
                   }))

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").HtmlAttributes(new { @class="myClass" }));
                   }))

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").HtmlAttributes(new Dictionary<string, object>() {  }));
                   }))

Visible(System.Func)

Sets the visible function which will determine if the command button will render.

Parameters

handler - System.Func<Object,Object>

The visible function.

Visible(System.String)

Sets the visible function which will determine if the command button will render.

Parameters

handler - System.String

The visible function.

Example


               @(Html.Kendo().Grid(Model)
                   .Name("grid")
                   .Columns(columns =>
                   {
                       columns.Command(cmd=>cmd.Custom("Button").Visible("handlerName"));
                   }))

In this article
Not finding the help you need?