TreeListToolbarFactory
Methods
Custom()
Adds an item for a custom action.
RETURNS
Returns a with the available configuration options.
Create()
Adds an item for the create action.
RETURNS
Returns a with the available configuration options.
Excel()
Adds an item for the excel action.
RETURNS
Returns a with the available configuration options.
Pdf()
Adds an item for the pdf action.
RETURNS
Returns a with the available configuration options.
Cancel()
Adds an item for the cancel action.
Example
Razor
@(Html.Kendo().TreeList<UserViewModel>()
.Name("treelist")
.Toolbar(toolbar => toolbar.Cancel())
)
Save()
Adds an item for the save action.
Example
Razor
@(Html.Kendo().TreeList<UserViewModel>()
.Name("treelist")
.Toolbar(toolbar => toolbar.Save())
)
Search()
Adds an item for the search action.
Example
Razor
@(Html.Kendo().TreeList<UserViewModel>()
.Name("treelist")
.Toolbar(toolbar => toolbar.Search())
)
Custom(Kendo.Mvc.UI.Fluent.TemplateBuilder)
Adds a custom component to the toolbar.
Parameters
template - TemplateBuilder<TModel>
The template component configuration for the custom component
Example
Razor
@(Html.Kendo().TreeList<UserViewModel>()
.Name("treelist")
.Toolbar(t =>
{
t.Custom(Html.Kendo().Template()
.AddComponent(c => c.Button()
.Name("refresh")
.Icon("arrow-rotate-cw")
.HtmlAttributes(new { title = "Refresh" })
.Events(ev => ev.Click("refresh"))));
})
)
Separator()
Adds a separator to the ToolBar.
Example
Razor
@(Html.Kendo().TreeList<UserViewModel>()
.Name("treelist")
.Toolbar(toolbar => toolbar
.Separator())
)
Spacer()
Adds a spacer to the ToolBar.
Example
Razor
@(Html.Kendo().TreeList<UserViewModel>()
.Name("treelist")
.Toolbar(toolbar => toolbar
.Spacer())
)