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

Defines the fluent API for configuring List<TreeListToolbar<T>>

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

Initializes a new instance of the TreeListToolbarFactory<T> class.

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

The TreeListToolbarFactory container.

Properties

Gets the container of the TreeListToolbarFactory

C#
protected List<TreeListToolbar<T>> Container { get; }

Gets or sets the TreeList

C#
public TreeList<T> TreeList { get; set; }

Methods

Adds an item for the cancel action.

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

TreeListToolbarBuilder<T>

Returns the current TreeListToolbarBuilder<T> instance.

Example:
C#
@(Html.Kendo().TreeList&lt;EmployeeViewModel&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<T> with the available configuration options.

Adds an item for a custom action.

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

TreeListToolbarBuilder<T>

Returns a TreeListToolbarBuilder<T> 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;EmployeeViewModel&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<T> with the available configuration options.

Adds an item for the pdf action.

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

TreeListToolbarBuilder<T>

Returns a TreeListToolbarBuilder<T> with the available configuration options.

Adds an item for the save action.

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

TreeListToolbarBuilder<T>

Returns the current TreeListToolbarBuilder<T> instance.

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

Adds an item for the search panel.

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

TreeListToolbarBuilder<T>

Returns the current TreeListToolbarBuilder<T> instance.

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

Adds a separator to the ToolBar.

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

Adds a spacer to the ToolBar.

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