GridActionCommandBuilderBase
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"));
}))
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>() { }));
}))
HtmlAttributes(System.String)
Sets the HTML attributes.
Parameters
attributesHandler - System.String
The HTML attributes.
Example
@(Html.Kendo().Grid(Model)
.Name("grid")
.Columns(columns =>
{
columns.Command(cmd=>cmd.Custom("Button").HtmlAttributes("attributesHandler"));
}))
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"));
}))