[]
        
(Showing Draft Content)

C1.Web.Mvc.TreeView

TreeView Class

Defines a control which displays a hierarchical list which may contain text, checkboxes, images, or arbitrary HTML content.

Inheritance
TreeView
Implements
Namespace: C1.Web.Mvc
Assembly: C1.Web.Mvc.dll
Syntax
public class TreeView : Control, IHtmlString, ITemplate

Constructors

Name Description
TreeView(HtmlHelper, string)

Creates one TreeView instance.

Properties

Name Description
AllowDragging

Gets or sets a value that determines whether users can drag and drop nodes within the TreeView control.

AutoCollapse

Gets or sets a value that determines if sibling nodes should be collapsed when a node is expanded.

CheckOnClick

Gets or sets a value that determines whether to toggle checkboxes when the user clicks the node header.

CheckedMemberPath

Gets or sets the name of the property (or properties) to bind to the node's checked state.

ChildItemsPath

Gets or sets the name of the property (or properties) that contains the child items for each node. When it is not set, ['items'] will be used.

CollapseOnClick

Gets or sets a value that determines whether to collapse expanded nodes when the user clicks the node header.

CollapseWhenDisabled

Gets or sets a value that determines whether nodes should be collapsed when they are disabled.

DisplayMemberPath

Gets or sets the name of the property (or properties) to use as the visual representation of the nodes. When it is not set, ['header'] will be used.

ExpandOnClick

Gets or sets a value that determines whether to expand collapsed nodes when the user clicks the node header.

ExpandOnLoad

Gets or sets a value that determines whether to toggle checkboxes when the user clicks the node header.

ImageMemberPath

Gets or sets the name of the property (or properties) to use as a source of images for the nodes.

IsAnimated

Gets or sets a value that indicates whether to use animations when expanding or collapsing nodes.

IsContentHtml

Gets or sets a value indicating whether items are bound to plain text or HTML.

IsReadOnly

Gets or sets a value that determines whether users can edit the text in the nodes. When it is set to false, users may edit the content of the tree nodes by typing directly into the nodes. The F2 key can also be used to enter edit mode with the whole node content selected.

LazyLoadActionUrl

Gets or sets the url to get the lazy nodes in TreeView.

LazyLoadFunction

Gets or sets a client function that loads child nodes on demand.

LoadActionUrl

Gets or sets the url to get the items in TreeView.

OnClientCheckedItemsChanged

Occurs when the checked items are changed.

OnClientDragEnd

Occurs when the user finishes a drag/drop operation, either by dropping a node into a new location or by canceling the operation with the mouse or keyboard.

OnClientDragOver

Occurs while the user drags a node over other nodes on the TreeView.

OnClientDragStart

Occurs when the user starts dragging a node. This event only occurs if the AllowDrag property is set to true.

OnClientDrop

Occurs when the user drops a on the TreeView.

OnClientFormatItem

Occurs when an element representing a node has been created.

OnClientIsCheckedChanged

Occurs after the check status of a node is changed.

OnClientIsCheckedChanging

Occurs before the check status of a node is changed.

OnClientIsCollapsedChanged

Occurs after a node is collapsed or expanded.

OnClientIsCollapsedChanging

Occurs before a node is collapsed or expanded.

OnClientItemClicked

Occurs when the user clicks an item or presses the Enter key and an item is selected.

OnClientItemsSourceChanged

Occurs when the value of the ItemsSource property changes.

OnClientLoadedItems

Occurs after the tree items have been generated.

OnClientLoadingItems

Occurs before the tree items are generated.

OnClientNodeEditEnded

Occurs after a node has exited edit mode.

OnClientNodeEditEnding

Occurs before a node exits edit mode.

OnClientNodeEditStarted

Occurs after a node has entered edit mode.

OnClientNodeEditStarting

Occurs before a node enters edit mode.

OnClientReponseTextParsing

Occurs when parsing the response text.

OnClientRequestDataStringifying

Occurs when serializing the request data.

OnClientSelectedItemChanged

Occurs when the selected item is changes.

ShowCheckboxes

Gets or sets a value that determines whether the TreeView control should add checkboxes to nodes and manage their state. This property can be used only on trees without lazy-loaded nodes(LazyLoadFunction is not set and IsLazyLoading is false).

Source

Gets or sets the array that contains the items in TreeView. Arrays usually have a hierarchical structure with items that contain child items. There is no fixed limit to the depth of the items.

Extension Methods