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

GridSelectActionCommandBuilder

Defines the fluent interface for configuring select action command.

Methods

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"));
                   }))

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?