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

Defines the fluent interface for configuring toolbar commands.

Definition

Constructors

C#
public GridToolBarCommandFactory(GridToolBarSettings<T> settings, GridMessagesCommandsSettings messagesSettings)
Parameters:settingsGridToolBarSettings<T>messagesSettingsGridMessagesCommandsSettings

Methods

Sets the toolbar template

C#
public void ClientTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The template component which contains the template.

Sets the toolbar template

C#
public void ClientTemplateHandler(string template)
Parameters:templatestring

The function handler which contains the template.

Sets the server-side toolbar template.

C#
public void Template(Action template)
Parameters:templateAction

The action defining the template.

Sets the server-side toolbar template.

C#
public void Template(Action<Grid<T>> template)
Parameters:templateAction<Grid<T>>

The action defining the template.

Sets the toolbar template.

C#
public void Template(Func<Grid<T>, object> template)
Parameters:templateFunc<Grid<T>, object>

The action defining the template.

Sets toolbar template.

C#
public void Template(string template)
Parameters:templatestring

The string template

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.ToolBar(t =&gt; t.Template("ToolbarTemplate"))
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Scrollable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)