Sets toolbar template.
Parameters template -System.String
The action defining the template.
ClientTemplateId(System.String)Sets the id of the script element which contains the client-side toolbar template of the grid.
Parameters template -System.String
ClientTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
Sets toolbar template.
Parameters templateView -Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template.
ClientTemplateHandler(System.String) Parameters template -System.String
ClientTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder) Parameters template - TemplateBuilder<TModel> Create()
Defines a create command.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Create())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Excel()
Represents a command which exports the current grid data to Excel.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Excel())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Pdf()
Represents a command which exports the current grid data to PDF.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Pdf())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Save()
Defines a save command.
RETURNSReturns a GridToolBarSaveCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Save())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Custom()
Defines a custom command.
RETURNSReturns a GridToolBarCustomCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Custom())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Search()
Defines a custom command.
RETURNSReturns a GridToolBarSearchCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Search())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Columns()
Adds a global column menu to the ToolBar.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Columns())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.ColumnMenu()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
ColumnChooser()
Adds a command that enables the user to change the visibillity of the Grid's columns.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.ColumnsChooser())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.ColumnMenu()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Filter()
Adds a command that enables the user to use the filtering functionallity of the Grid.
RETURNSReturns a GridToolBarFilterCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Filter())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Sort()
Adds a command that enables the user to use the sorting functionallity of the Grid.
RETURNSReturns a GridToolBarSortCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Filter())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Group()
Adds a command that enables the user to use the grouping functionallity of the Grid
RETURNSReturns a GridToolBarGroupCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Group())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.Groupable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
CancelEdit()
Adds a command that cancels the changes to the dataItem that is being currenly edited.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.CancelEdit())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.Sortable()
.Editable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Update()
Adds a command that saves the changes to the dataItem that is being currenly edited. Applicable when using InLine Editing.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Update())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.Sortable()
.Editable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Destroy()
Adds a command that removes the selected item. To work as expected, the grid should be have the Selectable configuration enabled. If multiple selection is enabled, the item which will be remoed is the last selected one.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Destroy())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.Sortable()
.Editable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Edit()
Adds a command that triggers the edit state of currently selected item. To work as expected, the grid should have the Selectable configuration enabled. If multiple selection is enabled, the item which will be edited is the last selected one.
RETURNSReturns a GridToolBarCommandBuilder instance for further configuration of the command.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.ToolBar(t => t.Edit())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.Sortable()
.Editable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Separator()
Adds a separator to the ToolBar.
Spacer()Adds a spacer to the ToolBar.
Paste()Adds a DropDownList to the ToolBar that allows the user to customize the pasting behavior.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Selectable()
.AllowPaste()
.ToolBar(t => t.Paste())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
SelectAll()
Adds a checkbox to the ToolBar that allows the user to select all items. Requires enabled checkbox selection and multiple row selection
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Selectable()
.AllowPaste()
.ToolBar(t => t.Paste())
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4