menu

ASP.NET Web Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeViewPropertiesBuilder

    Show / Hide Table of Contents

    Class TreeViewPropertiesBuilder

    Inheritance
    System.Object
    TreeViewPropertiesBuilder
    Implements
    IPropertiesBuilder
    System.Web.IHtmlString
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.JavaScript
    Assembly: Syncfusion.EJ.dll
    Syntax
    public class TreeViewPropertiesBuilder : IPropertiesBuilder, IHtmlString

    Constructors

    TreeViewPropertiesBuilder()

    Represents the TreeView properties

    Declaration
    public TreeViewPropertiesBuilder()

    TreeViewPropertiesBuilder(TreeView)

    Declaration
    public TreeViewPropertiesBuilder(TreeView treeview)
    Parameters
    Type Name Description
    TreeView treeview

    Fields

    treeview

    The TreeView can be easily configured with the DOM element, such as div or ul. you can create a TreeView with a highly customizable look and feel.

    Declaration
    public TreeView treeview
    Field Value
    Type Description
    TreeView

    Methods

    AllowDragAndDrop()

    Set true value that indicate to enable drag and drop a node within the same tree.

    Declaration
    public TreeViewPropertiesBuilder AllowDragAndDrop()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowDragAndDrop(Boolean)

    Gets or sets a value that indicates whether to enable drag and drop a node within the same tree.A boolean variable allowDragAndDrop is passed as an argument.

    Declaration
    public TreeViewPropertiesBuilder AllowDragAndDrop(bool allowDragAndDrop)
    Parameters
    Type Name Description
    System.Boolean allowDragAndDrop
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowDragAndDropAcrossControl()

    Sets true value that indicate to enable drag and drop a node in inter ej.TreeView.

    Declaration
    public TreeViewPropertiesBuilder AllowDragAndDropAcrossControl()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowDragAndDropAcrossControl(Boolean)

    Gets or sets a value that indicates whether to enable drag and drop a node in inter ej.TreeView.A boolean variable allowDragAndDropAcrossControl is passed.

    Declaration
    public TreeViewPropertiesBuilder AllowDragAndDropAcrossControl(bool allowDragAndDropAcrossControl)
    Parameters
    Type Name Description
    System.Boolean allowDragAndDropAcrossControl
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowDropChild()

    Sets true value that indicate to drop a node to a child of particular node.

    Declaration
    public TreeViewPropertiesBuilder AllowDropChild()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowDropChild(Boolean)

    Gets or sets a value that indicates whether to drop a node to a child of particular node.A boolean variable allowDropChild is passed.

    Declaration
    public TreeViewPropertiesBuilder AllowDropChild(bool allowDropChild)
    Parameters
    Type Name Description
    System.Boolean allowDropChild
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowDropSibling()

    Sets true value that indicate to drop a node to a sibling of particular node.

    Declaration
    public TreeViewPropertiesBuilder AllowDropSibling()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowDropSibling(Boolean)

    Gets or sets a value that indicates whether to drop a node to a sibling of particular node.A boolean variable allowDropSibling is passed.

    Declaration
    public TreeViewPropertiesBuilder AllowDropSibling(bool allowDropSibling)
    Parameters
    Type Name Description
    System.Boolean allowDropSibling
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowEditing()

    Sets true value that indicate to enable node editing support for TreeView.

    Declaration
    public TreeViewPropertiesBuilder AllowEditing()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowEditing(Boolean)

    Gets or sets a value that indicates whether to enable node editing support for TreeView.A boolean variable allowEditing is passed.

    Declaration
    public TreeViewPropertiesBuilder AllowEditing(bool allowEditing)
    Parameters
    Type Name Description
    System.Boolean allowEditing
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowKeyboardNavigation()

    Sets true value that indicate to enable keyboard support for TreeView actions like nodeSelection, nodeEditing, nodeExpand, nodeCollapse, nodeCut and Paste.

    Declaration
    public TreeViewPropertiesBuilder AllowKeyboardNavigation()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowKeyboardNavigation(Boolean)

    Gets or sets a value that indicates whether to enable keyboard support for TreeView actions like nodeSelection, nodeEditing, nodeExpand, nodeCollapse, nodeCut and Paste.A boolean variable is passed.

    Declaration
    public TreeViewPropertiesBuilder AllowKeyboardNavigation(bool allowKeyboardNavigation)
    Parameters
    Type Name Description
    System.Boolean allowKeyboardNavigation
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowMultiSelection()

    Sets true value that indicate to enable the multi selection in TreeView.

    Declaration
    public TreeViewPropertiesBuilder AllowMultiSelection()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AllowMultiSelection(Boolean)

    Gets or sets a value that indicates whether to enable or disable the multi selection in TreeView.

    Declaration
    public TreeViewPropertiesBuilder AllowMultiSelection(bool allowMultiSelection)
    Parameters
    Type Name Description
    System.Boolean allowMultiSelection
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AutoCheck()

    Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node.

    Declaration
    public TreeViewPropertiesBuilder AutoCheck()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AutoCheck(Boolean)

    Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node.A boolean variable autoCheck is passed.

    Declaration
    public TreeViewPropertiesBuilder AutoCheck(bool autoCheck)
    Parameters
    Type Name Description
    System.Boolean autoCheck
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AutoCheckParentNode()

    Allow us to specify the parent node to be retain in checked or unchecked state instead of going for indeterminate state.

    Declaration
    public TreeViewPropertiesBuilder AutoCheckParentNode()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    AutoCheckParentNode(Boolean)

    Allow us to specify the parent node to be retain in checked or unchecked state instead of going for indeterminate state.A boolean variable autoCheckParentNode is passed.

    Declaration
    public TreeViewPropertiesBuilder AutoCheckParentNode(bool autoCheckParentNode)
    Parameters
    Type Name Description
    System.Boolean autoCheckParentNode
    Returns
    Type Description
    TreeViewPropertiesBuilder

    CheckedNodes(List<Int32>)

    Gets or sets a value that indicates the checkedNodes index collection as an array. The given array index position denotes the nodes, that are checked while rendering TreeView.

    Declaration
    public TreeViewPropertiesBuilder CheckedNodes(List<int> checkedNodes)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Int32> checkedNodes
    Returns
    Type Description
    TreeViewPropertiesBuilder

    ClientSideEvents(Action<TreeViewClientSideEventsBuilder>)

    Represents the client side events

    Declaration
    public TreeViewPropertiesBuilder ClientSideEvents(Action<TreeViewClientSideEventsBuilder> clientSideEvents)
    Parameters
    Type Name Description
    System.Action<TreeViewClientSideEventsBuilder> clientSideEvents
    Returns
    Type Description
    TreeViewPropertiesBuilder

    CssClass(String)

    Sets the root CSS class for TreeView which allow us to customize the appearance.

    Declaration
    public TreeViewPropertiesBuilder CssClass(string cssClass)
    Parameters
    Type Name Description
    System.String cssClass
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnableAnimation()

    Sets true value that indicate to enable the animation effect while expanding or collapsing a node.

    Declaration
    public TreeViewPropertiesBuilder EnableAnimation()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnableAnimation(Boolean)

    Gets or sets a value that indicates whether to enable or disable the animation effect while expanding or collapsing a node.A boolean variable enableAnimation is passed.

    Declaration
    public TreeViewPropertiesBuilder EnableAnimation(bool enableAnimation)
    Parameters
    Type Name Description
    System.Boolean enableAnimation
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Enabled()

    Sets true value that indicate to TreeView can be enabled.

    Declaration
    public TreeViewPropertiesBuilder Enabled()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Enabled(Boolean)

    Gets or sets a value that indicates whether a TreeView can be enabled or disabled. No actions can be performed while this property is set as false.A boolean variable enabled is passed.

    Declaration
    public TreeViewPropertiesBuilder Enabled(bool enabled)
    Parameters
    Type Name Description
    System.Boolean enabled
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnableMultipleExpand()

    Sets true value that indicate to multiple nodes to be in expanded state.

    Declaration
    public TreeViewPropertiesBuilder EnableMultipleExpand()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnableMultipleExpand(Boolean)

    Allow us to prevent multiple nodes to be in expanded state. If it set to false, previously expanded sibling node will be collapsed automatically, while we expand a node.A boolean variable enableMultipleExpand is passed as an argument.

    Declaration
    public TreeViewPropertiesBuilder EnableMultipleExpand(bool enableMultipleExpand)
    Parameters
    Type Name Description
    System.Boolean enableMultipleExpand
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnablePersistence()

    Sets true value that indicate to persist the TreeView model state in page using applicable medium i.e., HTML5 localStorage or cookies.

    Declaration
    public TreeViewPropertiesBuilder EnablePersistence()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnablePersistence(Boolean)

    Sets a value that indicates whether to persist the TreeView model state in page using applicable medium i.e., HTML5 localStorage or cookies.A boolean variable enablePersistence is passed.

    Declaration
    public TreeViewPropertiesBuilder EnablePersistence(bool enablePersistence)
    Parameters
    Type Name Description
    System.Boolean enablePersistence
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnableRTL()

    Sets true value that indicate to align content in the TreeView control from right to left.

    Declaration
    public TreeViewPropertiesBuilder EnableRTL()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    EnableRTL(Boolean)

    Gets or sets a value that indicates to align content in the TreeView control from right to left.A boolean variable enableRTL is passed.

    Declaration
    public TreeViewPropertiesBuilder EnableRTL(bool enableRTL)
    Parameters
    Type Name Description
    System.Boolean enableRTL
    Returns
    Type Description
    TreeViewPropertiesBuilder

    ExpandedNodes(List<Int32>)

    Gets or sets a array of value that indicates the expandedNodes index collection as an array. The given array index position denotes the nodes, that are expanded while rendering TreeView.

    Declaration
    public TreeViewPropertiesBuilder ExpandedNodes(List<int> expandedNodes)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Int32> expandedNodes
    Returns
    Type Description
    TreeViewPropertiesBuilder

    ExpandOn(String)

    Gets or sets a value that indicates the TreeView node can be expand or collapse by using the specified action.

    Declaration
    public TreeViewPropertiesBuilder ExpandOn(string expandOn)
    Parameters
    Type Name Description
    System.String expandOn
    Returns
    Type Description
    TreeViewPropertiesBuilder

    FullRowSelect()

    Sets true value that indicate to enable the full row selection in TreeView.

    Declaration
    public TreeViewPropertiesBuilder FullRowSelect()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    FullRowSelect(Boolean)

    Gets or sets a value that indicates whether to enable or disable the full row selection in TreeView.

    Declaration
    public TreeViewPropertiesBuilder FullRowSelect(bool fullRowSelect)
    Parameters
    Type Name Description
    System.Boolean fullRowSelect
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Height(String)

    Defines the height of the TreeView.

    Declaration
    public TreeViewPropertiesBuilder Height(string height)
    Parameters
    Type Name Description
    System.String height
    Returns
    Type Description
    TreeViewPropertiesBuilder

    HtmlAttributes(IDictionary<String, Object>)

    Specifieed the custom attributes will be added to TreeView control.

    Declaration
    public TreeViewPropertiesBuilder HtmlAttributes(IDictionary<string, object> itemHtmlAttributes)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.Object> itemHtmlAttributes
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Items(Action<TreeViewBaseItemAdder>)

    Declaration
    public TreeViewPropertiesBuilder Items(Action<TreeViewBaseItemAdder> items)
    Parameters
    Type Name Description
    System.Action<TreeViewBaseItemAdder> items
    Returns
    Type Description
    TreeViewPropertiesBuilder

    LoadOnDemand()

    Specifies the child nodes to be loaded on demand.

    Declaration
    public TreeViewPropertiesBuilder LoadOnDemand()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    LoadOnDemand(Boolean)

    Specifies the child nodes to be loaded on demand.A boolean variable loadOnDemand is passed.

    Declaration
    public TreeViewPropertiesBuilder LoadOnDemand(bool loadOnDemand)
    Parameters
    Type Name Description
    System.Boolean loadOnDemand
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Render()

    Renders this instance.

    Declaration
    public void Render()

    SelectedNode(Int32)

    Gets or Sets a value that indicates the index position of a tree node. The particular index tree node will be selected while rendering the TreeView.

    Declaration
    public TreeViewPropertiesBuilder SelectedNode(int selectedNode)
    Parameters
    Type Name Description
    System.Int32 selectedNode
    Returns
    Type Description
    TreeViewPropertiesBuilder

    SelectedNodes(List<Int32>)

    Gets or sets a value that indicates the selectedNodes index collection as an array. The given array index position denotes the nodes, that are selectedNodes while rendering TreeView.

    Declaration
    public TreeViewPropertiesBuilder SelectedNodes(List<int> selectedNodes)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Int32> selectedNodes
    Returns
    Type Description
    TreeViewPropertiesBuilder

    ShowCheckbox()

    Sets true value that indicate to display checkbox for all TreeView nodes.

    Declaration
    public TreeViewPropertiesBuilder ShowCheckbox()
    Returns
    Type Description
    TreeViewPropertiesBuilder

    ShowCheckbox(Boolean)

    Gets or sets a value that indicates whether to display or hide checkbox for all TreeView nodes.A boolean variable showCheckbox is passed.

    Declaration
    public TreeViewPropertiesBuilder ShowCheckbox(bool showCheckbox)
    Parameters
    Type Name Description
    System.Boolean showCheckbox
    Returns
    Type Description
    TreeViewPropertiesBuilder

    SortSettings(Action<TreeViewSortSettingsBuilder>)

    By using sortSettings property, you can customize the sorting option in TreeView control.

    Declaration
    public TreeViewPropertiesBuilder SortSettings(Action<TreeViewSortSettingsBuilder> sortSettings)
    Parameters
    Type Name Description
    System.Action<TreeViewSortSettingsBuilder> sortSettings
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Template(String)

    Allow us to use custom template in order to create TreeView.

    Declaration
    public TreeViewPropertiesBuilder Template(string template)
    Parameters
    Type Name Description
    System.String template
    Returns
    Type Description
    TreeViewPropertiesBuilder

    ToHtmlString()

    Returns an HTML-encoded string.

    Declaration
    public string ToHtmlString()
    Returns
    Type Description
    System.String

    TreeViewFields(Action<TreeViewFieldsBuilder>)

    Gets or sets a fields object that allow us to map the data members with field properties in order to make the data binding easier.

    Declaration
    public TreeViewPropertiesBuilder TreeViewFields(Action<TreeViewFieldsBuilder> fields)
    Parameters
    Type Name Description
    System.Action<TreeViewFieldsBuilder> fields
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Width(String)

    Defines the width of the TreeView.

    Declaration
    public TreeViewPropertiesBuilder Width(string width)
    Parameters
    Type Name Description
    System.String width
    Returns
    Type Description
    TreeViewPropertiesBuilder

    Implements

    IPropertiesBuilder
    System.Web.IHtmlString
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved