Class TreeView
Represents the TreeView UI
Inheritance
System.Object
TreeView
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class TreeView : CommonDataBoundControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
TreeView()
Declaration
Properties
AllowDragAndDrop
Allows to drag and drop the treeview nodes
Declaration
public bool AllowDragAndDrop { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AllowDragAndDropAcrossControl
Gets or sets a value that indicates whether to enable drag and drop of a node into the ej.TreeView.
Declaration
public bool AllowDragAndDropAcrossControl { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AllowDropChild
Specifies the whether the droped node as child of particular node
Declaration
public bool AllowDropChild { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AllowDropSibling
Gets or sets a value that indicates whether to drop a node to a sibling of a particular node.
Declaration
public bool AllowDropSibling { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AllowEditing
Gets or sets a value that indicates whether to enable node editing support for the Treeview
Declaration
public bool AllowEditing { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AllowKeyboardNavigation
Gets or sets a value that indicates whether to enable keyboard support for Treeview actions like NodeSelection, NodeEditing, NodeExpand, NodeCollapse, NodeCut, Copy, and Paste
Declaration
public bool AllowKeyboardNavigation { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AllowMultiSelection
Allows to select multiple nodes
Declaration
public bool AllowMultiSelection { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AutoCheck
Allow you to specify the parent and child nodes to get auto check.
Declaration
public bool AutoCheck { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
AutoCheckParentNode
Allow you to specify the parent node to be retained in the checked or unchecked state instead of going for indeterminate state
Declaration
public bool AutoCheckParentNode { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
CheckedNodes
Declaration
public List<int> CheckedNodes { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<System.Int32> |
|
Child
Menu child as Inner property, which help us to bind the data sources from data adaptors to child items
Declaration
public TreeViewChildDataFields Child { get; set; }
Property Value
ClientSideOnBeforeAdd
Triggers before add the node
Declaration
public string ClientSideOnBeforeAdd { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforeCollapsed
Fires when BeforeCollapse is done successfully
Declaration
public string ClientSideOnBeforeCollapsed { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforeCut
Triggers before cut the node
Declaration
public string ClientSideOnBeforeCut { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforeDelete
Triggers before the node has been deleted
Declaration
public string ClientSideOnBeforeDelete { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforeEdit
Fires when BeforeEdit is done successfully
Declaration
public string ClientSideOnBeforeEdit { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforeExpanded
Fires when BeforeExpand is done successfully.
Declaration
public string ClientSideOnBeforeExpanded { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforeLoad
Triggers when the node has been pasted
Declaration
public string ClientSideOnBeforeLoad { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforePaste
Triggers before the node has been pasted
Declaration
public string ClientSideOnBeforePaste { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnBeforeSelect
Triggers before select the Treeview Node
Declaration
public string ClientSideOnBeforeSelect { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnCreated
Triggers when the control has been created
Declaration
public string ClientSideOnCreated { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnDestroy
Fires when NodeDestroyed is successful
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnInlineEditValidation
Fires when InlineEditValidation is done successfully.
Declaration
public string ClientSideOnInlineEditValidation { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnKeyPressed
Fires when KeyPressed is done successfully
Declaration
public string ClientSideOnKeyPressed { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnLoadError
Triggers when the control has been loaded with error
Declaration
public string ClientSideOnLoadError { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnLoadSuccess
Triggers when the control has been loaded successfully
Declaration
public string ClientSideOnLoadSuccess { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeAdd
Triggers when the Node has been added
Declaration
public string ClientSideOnNodeAdd { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeChecked
Fires when NodeCheck is done successfully
Declaration
public string ClientSideOnNodeChecked { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeClicked
Triggers when the click in the TreeView node
Declaration
public string ClientSideOnNodeClicked { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeCollapsed
Triggerd when TreeView Node has been collapsed
Declaration
public string ClientSideOnNodeCollapsed { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeCut
Triggers when cut the node
Declaration
public string ClientSideOnNodeCut { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeDelete
Triggers when the node has been deleted
Declaration
public string ClientSideOnNodeDelete { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeDraged
Fires when NodeDrag is done successfully
Declaration
public string ClientSideOnNodeDraged { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeDragStarted
Fires when NodeDragStart is done successfully.
Declaration
public string ClientSideOnNodeDragStarted { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeDragStoped
Fires when NodeDragStop is done successfully
Declaration
public string ClientSideOnNodeDragStoped { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeDropped
Fires when NodeDropped is successful.
Declaration
public string ClientSideOnNodeDropped { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeEdit
Triggers when edit the treeview node
Declaration
public string ClientSideOnNodeEdit { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeExpanded
Triggers after the node has been expanded
Declaration
public string ClientSideOnNodeExpanded { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodePaste
Triggers when the node has been pasted
Declaration
public string ClientSideOnNodePaste { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeSelected
Fires when NodeSelect is done successfully.
Declaration
public string ClientSideOnNodeSelected { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeUnchecked
Fires when NodeUncheck is done successfully
Declaration
public string ClientSideOnNodeUnchecked { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnNodeUnselected
Fires when NodeUnselect is done successfully.
Declaration
public string ClientSideOnNodeUnselected { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ClientSideOnReady
Fires when TreeView nodes are loaded successfully.
Declaration
public string ClientSideOnReady { get; set; }
Property Value
| Type |
Description |
| System.String |
|
CssClass
Specifies the cssClass of the treeview to customize the UI
Declaration
public override string CssClass { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataBindings
Declaration
public List<TreeViewBinding> DataBindings { get; }
Property Value
DataExpandedField
Declaration
public string DataExpandedField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataHasChildField
Declaration
public string DataHasChildField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataHtmlAttributeField
Declaration
public string DataHtmlAttributeField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataIdField
Declaration
public string DataIdField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataImageAttributeField
Declaration
public string DataImageAttributeField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataImageUrlField
Declaration
public string DataImageUrlField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataIsCheckedField
Declaration
public string DataIsCheckedField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataLinkAttributeField
Declaration
public string DataLinkAttributeField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataManager
Data Manager as Inner property, which help us to bind the data sources from data adaptors
Declaration
public DataSource DataManager { get; set; }
Property Value
DataParentIdField
Declaration
public string DataParentIdField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataSelectedField
Declaration
public string DataSelectedField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataSource
Declaration
public object DataSource { get; set; }
Property Value
| Type |
Description |
| System.Object |
|
DataSourceCachingMode
Declaration
public DataSourceCachingMode DataSourceCachingMode { get; set; }
Property Value
DataSpriteCssField
Declaration
public string DataSpriteCssField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataTextField
Declaration
public string DataTextField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DataValueField
Declaration
public string DataValueField { get; set; }
Property Value
| Type |
Description |
| System.String |
|
EmptyDataText
Specifies the treeview node with empty data
Declaration
public string EmptyDataText { get; set; }
Property Value
| Type |
Description |
| System.String |
|
EnableAnimation
Specifies the animation state of treeview
Declaration
public bool EnableAnimation { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Enabled
Defines whether you can enable or disable the TreeView.
Declaration
public override bool Enabled { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
EnableMultipleExpand
Enables the multiple node in expand state
Declaration
public bool EnableMultipleExpand { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
EnablePersistence
Saves current model value to browser cookies for maintaining states. On refreshing, the Treeview control page retains the model value apply from the browser cookies.
Declaration
public bool EnablePersistence { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
EnableRTL
Sets whether the direction is displayed from right to left
Declaration
public bool EnableRTL { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
ExpandedNodes
Declaration
public List<int> ExpandedNodes { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<System.Int32> |
|
ExpandOn
Specifies status of the Node expand in treeview
Declaration
public string ExpandOn { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Fields
Declaration
public TreeViewFields Fields { get; }
Property Value
FullRowSelect
Allows to select full row nodes
Declaration
public bool FullRowSelect { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Height
Specifies the height of the treeview
Declaration
public override Unit Height { get; set; }
Property Value
| Type |
Description |
| System.Web.UI.WebControls.Unit |
|
HtmlAttributes
Allow to add the Html Attributes to TreeView control
Declaration
public IDictionary<string, object> HtmlAttributes { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IDictionary<System.String, System.Object> |
|
LoadOnDemand
It allows the full content of the TreeView when too large to be loaded completely
Declaration
public bool LoadOnDemand { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Model
Collection of TreeView model items
Declaration
public TreeViewProperties Model { get; set; }
Property Value
Nodes
Declaration
public List<TreeViewNode> Nodes { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<TreeViewNode> |
|
Query
Declaration
public string Query { get; set; }
Property Value
| Type |
Description |
| System.String |
|
SelectedNode
Specifies the selected node of the treeview
Declaration
public int SelectedNode { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
SelectedNodes
Declaration
public List<int> SelectedNodes { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<System.Int32> |
|
ShowCheckbox
Shows/hides the checkbox in treeview
Declaration
public bool ShowCheckbox { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
SortSettings
Declaration
[JsonProperty("sortSettings")]
public TreeViewSortSettings SortSettings { get; set; }
Property Value
TableName
Declaration
public string TableName { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Template
Specifies the template of the treeview node
Declaration
public string Template { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Width
Specifies the width of the treeview
Declaration
public override Unit Width { get; set; }
Property Value
| Type |
Description |
| System.Web.UI.WebControls.Unit |
|
Methods
DataBind(IEnumerable, DataSourceView)
Declaration
public bool DataBind(IEnumerable dataSource, DataSourceView dsView)
Parameters
| Type |
Name |
Description |
| System.Collections.IEnumerable |
dataSource |
|
| System.Web.UI.DataSourceView |
dsView |
|
Returns
| Type |
Description |
| System.Boolean |
|
DependentScripts()
Get the dependent script for Treeview control
Declaration
public List<string> DependentScripts()
Returns
| Type |
Description |
| System.Collections.Generic.List<System.String> |
|
FetchData(IEnumerable)
Declaration
public override void FetchData(IEnumerable data)
Parameters
| Type |
Name |
Description |
| System.Collections.IEnumerable |
data |
|
Overrides
GetDefaultDataBinding(Object)
Declaration
public TreeViewBinding GetDefaultDataBinding(object item)
Parameters
| Type |
Name |
Description |
| System.Object |
item |
|
Returns
GetDependentFiles()
Get the dependent files for Treeview control
Declaration
public override List<string> GetDependentFiles()
Returns
| Type |
Description |
| System.Collections.Generic.List<System.String> |
|
Overrides
GetFieldPropertyValue(String, PropertyDescriptorCollection, Object)
Declaration
protected string GetFieldPropertyValue(string sAttrName, PropertyDescriptorCollection propCollection, object oEnumerableItem)
Parameters
| Type |
Name |
Description |
| System.String |
sAttrName |
|
| System.ComponentModel.PropertyDescriptorCollection |
propCollection |
|
| System.Object |
oEnumerableItem |
|
Returns
| Type |
Description |
| System.String |
|
LoadViewState(Object)
Restores view-state information from a previous page request.
Declaration
protected override void LoadViewState(object state)
Parameters
| Type |
Name |
Description |
| System.Object |
state |
|
Overrides
OnLoad(EventArgs)
Represent when the control is loaded into the Page.
Declaration
protected override void OnLoad(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
|
Overrides
Declaration
protected override void PerformDataBinding(IEnumerable retrievedData)
Parameters
| Type |
Name |
Description |
| System.Collections.IEnumerable |
retrievedData |
|
Overrides
PostBackEventHandler(String, Dictionary<String, Object>)
Gets a value that indicates whether the page is being loaded in response to a postback.
Declaration
public override void PostBackEventHandler(string EventName, Dictionary<string, object> args)
Parameters
| Type |
Name |
Description |
| System.String |
EventName |
|
| System.Collections.Generic.Dictionary<System.String, System.Object> |
args |
|
Overrides
Render()
Declaration
Returns
| Type |
Description |
| System.String |
|
Render(HtmlTextWriter)
Render method for rendering control
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
| Type |
Name |
Description |
| System.Web.UI.HtmlTextWriter |
writer |
|
Overrides
SaveViewState()
Saves any server control view-state changes that have occurred since the time the page was posted back to the server.
Declaration
protected override object SaveViewState()
Returns
| Type |
Description |
| System.Object |
|
SetupItemBindingData(TreeViewNode, TreeViewBinding, Object)
Declaration
public virtual void SetupItemBindingData(TreeViewNode treeNode, TreeViewBinding treeBinding, object oEnumerableItem)
Parameters
UpdateServerModel(Dictionary<String, Object>)
Maintaining viewstate model values on post back
Declaration
public override void UpdateServerModel(Dictionary<string, object> ClientModel)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.Dictionary<System.String, System.Object> |
ClientModel |
|
Overrides
Events
InlineEditValidation
Declaration
public event TreeView.TreeViewEventHandler InlineEditValidation
Event Type
NodeChecked
Declaration
public event TreeView.TreeViewEventHandler NodeChecked
Event Type
NodeDropped
Declaration
public event TreeView.TreeViewEventHandler NodeDropped
Event Type
NodeEdit
Declaration
public event TreeView.TreeViewEventHandler NodeEdit
Event Type
NodeSelected
Declaration
public event TreeView.TreeViewEventHandler NodeSelected
Event Type
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService