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

Definition

Constructors

C#
public TreeView(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator, INavigationItemAuthorization authorization)
Parameters:viewContextViewContextinitializerIJavaScriptInitializerurlGeneratorIUrlGeneratorauthorizationINavigationItemAuthorization

Properties

C#
public ExpandableAnimation Animation { get; }
C#
public INavigationItemAuthorization Authorization { get; }

Implements: INavigationItemComponent<TreeViewItem>.Authorization

C#
public bool AutoBind { get; set; }

If set to true the widget will auto-scroll the containing element when the mouse/finger is close to the top/bottom of it.

C#
public bool? AutoScroll { get; set; }
C#
public TreeViewCheckboxesSettings Checkboxes { get; set; }

Sets the field of the data item that provides the icon name of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

C#
public string[] DataIconField { get; set; }

Sets the field of the data item that provides the image URL of the TreeView nodes.

C#
public string DataImageUrlField { get; set; }
C#
public DataSource DataSource { get; }
C#
public string DataSourceId { get; set; }

Sets the field of the data item that provides the sprite CSS class of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

C#
public string DataSpriteCssClassField { get; set; }
C#
public List<string> DataTextField { get; set; }

Sets the field of the data item that provides the link URL of the nodes.

C#
public string DataUrlField { get; set; }
C#
public TreeViewDragAndDropSettings DragAndDrop { get; }

Gets or sets the effects.

C#
public Effects Effects { get; set; }

Gets or sets a value indicating whether all the item is expanded.

C#
public bool ExpandAll { get; set; }
Property Value:

true if expand all is enabled; otherwise, false. The default value is false

C#
public bool HighlightPath { get; set; }

Gets or sets the item action.

C#
public Action<TreeViewItem> ItemAction { get; set; }

Implements: INavigationItemComponent<TreeViewItem>.ItemAction

Gets the items of the treeview.

C#
public IList<TreeViewItem> Items { get; }

Implements: INavigationItemContainer<TreeViewItem>.Items

C#
public bool LoadOnDemand { get; set; }

The text messages displayed in the widget. Use it to customize or localize the messages.

C#
public TreeViewMessagesSettings Messages { get; set; }
C#
public SecurityTrimming SecurityTrimming { get; set; }

Implements: INavigationItemComponent<TreeViewItem>.SecurityTrimming

C#
public int SelectedIndex { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }
C#
public string Template { get; set; }
C#
public string TemplateHandler { get; set; }
C#
public string TemplateId { get; set; }
C#
public IUrlGenerator UrlGenerator { get; }

Implements: INavigationItemComponent<TreeViewItem>.UrlGenerator

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)