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

Creates items for the TreeView.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class TreeViewItemFactory

Inheritance: objectTreeViewItemFactory

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 TreeViewItemFactory class.

C#
public TreeViewItemFactory(INavigationItemContainer<TreeViewItem> container, ViewContext viewContext)
Parameters:containerINavigationItemContainer<TreeViewItem>

The container.

viewContextViewContext

The view context.

Methods

Defines a item.

C#
public TreeViewItemBuilder Add()
Returns:

TreeViewItemBuilder

Returns a TreeViewItemBuilder with the available configuration options.

Example:
C#
@( Html.Kendo().TreeView()
.Name("treeview")
.Items(item =&gt; item.Add().Text("NewItem"))
)