TreeView
Kendo UI TreeView component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class TreeView : WidgetBase, IHtmlAttributesContainer, INavigationItemComponent<TreeViewItem>, INavigationItemContainer<TreeViewItem>
Inheritance: objectWidgetBaseTreeView
Implements:
Inherited Members
Constructors
Initializes a new instance of the TreeView class.
Properties
Animation member.
public ExpandableAnimation Animation { get; }
Gets or sets the Authorization.
public INavigationItemAuthorization Authorization { get; }
Implements:
If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.
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.
public bool? AutoScroll { get; set; }
If true or an object, renders checkboxes beside each node.
public TreeViewCheckboxesSettings Checkboxes { get; }
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.
public string[] DataIconField { get; set; }
Sets the field of the data item that provides the image URL of the TreeView nodes.
public string DataImageUrlField { get; set; }
Gets or sets the DataSource.
public DataSource DataSource { get; }
Gets or sets the DataSourceId.
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.
public string DataSpriteCssClassField { get; set; }
Sets the field of the data item that provides the text content 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.
public string[] DataTextField { get; set; }
Sets the field of the data item that provides the link URL of the nodes.
public string DataUrlField { get; set; }
Disables (false) or enables (true) drag-and-drop of the nodes. If configured as an object allows disabling click move click interaction as an alternative of dragging.
public TreeViewDragAndDropSettings DragAndDrop { get; }
Gets or sets a value indicating whether all the item is expanded.
public bool ExpandAll { get; set; }
true if expand all is enabled; otherwise, false. The default value is false
Gets or sets the HighlightPath.
public bool HighlightPath { get; set; }
Gets or sets the item action.
public Action<TreeViewItem> ItemAction { get; set; }
Implements:
Gets the items of the treeview.
public IList<TreeViewItem> Items { get; }
Implements:
Indicates whether the child DataSources should be fetched lazily when parent groups get expanded. Setting this to false causes all child DataSources to be loaded at initialization time.
public bool? LoadOnDemand { get; set; }
The text messages displayed in the widget. Use it to customize or localize the messages.
public TreeViewMessagesSettings Messages { get; }
Gets or sets the SecurityTrimming.
public SecurityTrimming SecurityTrimming { get; set; }
Implements:
Gets or sets the SelectedIndex.
public int SelectedIndex { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
The handler that returns the template used for Template
public string TemplateHandler { get; set; }
The id of the script element used for Template
public string TemplateId { get; set; }
Methods
Serializes the component settings to a dictionary.
public override IDictionary<string, object> Serialize()
A dictionary of settings.
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML content.
protected override void WriteHtml(TextWriter writer)
The text writer.
Overrides:
WriteInitializationScript method.
public override void WriteInitializationScript(TextWriter writer)
Overrides: