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

Defines the fluent API for adding items to Kendo TreeList for ASP.NET MVC

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class TreeListToolbarFactory<T> where T : class

Inheritance: objectTreeListToolbarFactory<T>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public TreeListToolbarFactory(List<TreeListToolbar> container)
Parameters:containerList<TreeListToolbar>

Methods

Adds an item for the cancel action.

C#
public virtual TreeListToolbarBuilder<T> Cancel()
Returns:

TreeListToolbarBuilder<T>

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Toolbar(toolbar =&gt; toolbar.Cancel())
)

Adds an item for the create action.

C#
public virtual TreeListToolbarBuilder<T> Create()
Returns:

TreeListToolbarBuilder<T>

Returns a TreeListToolbarBuilder with the available configuration options.

Adds an item for a custom action.

C#
public virtual TreeListToolbarBuilder<T> Custom()
Returns:

TreeListToolbarBuilder<T>

Returns a TreeListToolbarBuilder with the available configuration options.

Adds a custom component to the toolbar.

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

The template component configuration for the custom component

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Toolbar(t =&gt;
{
t.Custom(Html.Kendo().Template()
.AddComponent(c =&gt; c.Button()
.Name("refresh")
.Icon("arrow-rotate-cw")
.HtmlAttributes(new { title = "Refresh" })
.Events(ev =&gt; ev.Click("refresh"))));

})
)

Adds an item for the excel action.

C#
public virtual TreeListToolbarBuilder<T> Excel()
Returns:

TreeListToolbarBuilder<T>

Returns a TreeListToolbarBuilder with the available configuration options.

Adds an item for the pdf action.

C#
public virtual TreeListToolbarBuilder<T> Pdf()
Returns:

TreeListToolbarBuilder<T>

Returns a TreeListToolbarBuilder with the available configuration options.

Adds an item for the save action.

C#
public virtual TreeListToolbarBuilder<T> Save()
Returns:

TreeListToolbarBuilder<T>

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Toolbar(toolbar =&gt; toolbar.Save())
)

Adds an item for the search action.

C#
public virtual TreeListToolbarBuilder<T> Search()
Returns:

TreeListToolbarBuilder<T>

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Toolbar(toolbar =&gt; toolbar.Search())
)

Adds a separator to the ToolBar.

C#
public void Separator()
Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Toolbar(toolbar =&gt; toolbar
.Separator())
)

Adds a spacer to the ToolBar.

C#
public void Spacer()
Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Toolbar(toolbar =&gt; toolbar
.Spacer())
)