Click or drag to resize
KaxTreeView Class
A hierarchical control used to display a tree of nodes in a web page.
Inheritance Hierarchy
SystemObject
  System.Web.UIControl
    System.Web.UI.WebControlsWebControl
      System.Web.UI.WebControlsBaseDataBoundControl
        System.Web.UI.WebControlsDataBoundControl
          KaxDataBoundControl
            Kettic.AspNet.ControlsControlItemContainer
              Kettic.AspNet.ControlsHierarchicalControlItemContainer
                Kettic.AspNet.ControlsKaxTreeView

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public class KaxTreeView : HierarchicalControlItemContainer, 
	IKaxTreeNodeContainer, IPostBackEventHandler, ICallbackEventHandler

The KaxTreeView type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleKaxTreeView
Initializes a new instance of the KaxTreeView class.
Top
Methods
  NameDescription
Public methodCheckAllNodes
Checks all nodes of the current KaxTreeView object.
Public methodClearCheckedNodes Obsolete.
Public methodClearSelectedNodes Obsolete.
Public methodCollapseAllNodes
Collapses all nodes in the tree.
Public methodExpandAllNodes
Expands all nodes in the tree.
Public methodCode exampleFindNode
Returns the first KaxTreeNode that matches the conditions defined by the specified predicate. The predicate should returns a boolean value.
Public methodFindNodeByAttribute
Searches all nodes for a KaxTreeNode which contains the specified attribute and attribute value.
Public methodFindNodeByText(String)
Searches all nodes for a KaxTreeNode with a Text property equal to the specified text.
Public methodFindNodeByText(String, Boolean)
Searches all nodes for a KaxTreeNode with a Text property equal to the specified text.
Public methodFindNodeByUrl
Searches all nodes for a KaxTreeNode with a NavigateUrl property equal to the specified URL.
Public methodFindNodeByValue(String)
Searches all nodes for a KaxTreeNode with a Value property equal to the specified value.
Public methodFindNodeByValue(String, Boolean)
Searches all nodes for a KaxTreeNode with a Value property equal to the specified value.
Public methodGetAllNodes
Gets a linear list of all nodes in the KaxTreeView control.
Public methodLoadContentFile
Populates the control from the specified XML file.
(Overrides HierarchicalControlItemContainerLoadContentFile(String).)
Public methodLoadXmlString
Loads the control from an XML string. Identical to LoadXml.
Public methodUncheckAllNodes
This method unchecks all nodes of the current KaxTreeView instance. Useful when you need to uncheck all nodes after postback.
Public methodUnselectAllNodes
This method unselects all nodes of the current KaxTreeView instance. Useful when you need to clear node selection after postback.
Top
Properties
  NameDescription
Public propertyCode exampleAllowNodeEditing
Gets a value indicating whether the text of the tree nodes are edinodele in the browser.
Public propertyCheckBoxes
When set to true displays a checkbox next to each treenode.
Public propertyCheckChildNodes
Gets or sets a value indicating whether checking (unchecking) a node will check (uncheck) its child nodes.
Public propertyCode exampleCheckedNodes
Gets a collection of KaxTreeNode objects that represent the nodes in the control that display a selected check box.
Public propertyCode exampleClientChanges
Gets a list of all client-side changes (adding a node, removing a node, changing a node's property) which have occurred.
Public propertyCode exampleCollapseAnimation
Gets the settings for the animation played when a node closes.
Public propertyCode exampleContextMenus
Gets a collection of KaxTreeViewContextMenu objects that represent the context menus of a KaxTreeView control.
Public propertyDataBindings
Gets a collection of KaxTreeNodeBindingCollection objects that define the relationship between a data item and the tree node it is binding to.
Public propertyEnableAriaSupport
When set to true enables support for WAI-ARIA
Public propertyEnableDragAndDrop
When set to true enables drag-and-drop functionality
Public propertyEnableDragAndDropBetweenNodes
When set to true enables drag-and-drop visual clue (underline) between nodes while draggin
Public propertyCode exampleExpandAnimation
Gets the settings for the animation played when a node opens.
Public propertyIsEmpty
Gets a value indicating whether the KaxTreeView control has no nodes.
Public propertyCode exampleLoadingMessage
Gets or sets the loading message that is displayed when child nodes are retrieved on AJAX calls.
Public propertyCode exampleLoadingStatusPosition
Gets or sets the position of the loading message when child nodes are retrieved on AJAX calls.
Public propertyLoadingStatusTemplate
Public propertyMaxDataBindDepth
Gets or sets the maximum number of levels to bind to the KaxTreeView control.
(Overrides HierarchicalControlItemContainerMaxDataBindDepth.)
Public propertyMultipleSelect
When set to true the treeview allows multiple node selection (by holding down ctrl key while selecting nodes)
Public propertyCode exampleNodes
Gets a KaxTreeNodeCollection object that contains the root nodes of the current KaxTreeView control.
Public propertyNodeTemplate
Gets or sets the template for displaying all node in the current KaxTreeView.
Public propertyOnClientContextMenuItemClicked
The name of the JavaScript function that will be called after the user clicks on a context menu item.
Public propertyOnClientContextMenuItemClicking
The name of the JavaScript function that will be called when the user clicks on a context menu item.
Public propertyOnClientContextMenuShowing
The name of the JavaScript function that will be called when a context menu is to be displayed.
Public propertyOnClientContextMenuShown
The name of the JavaScript function that will be called after context menu is displayed.
Public propertyOnClientDoubleClick
The name of the JavaScript function that will be called when the user double clicks on a node.
Public propertyOnClientKeyPressing
The name of the JavaScript function that will be called when a key is pressed.
Public propertyOnClientLoad
Gets or sets the name of the JavaScript function called when the control is fully initialized on the client side.
Public propertyOnClientMouseOut
The name of the JavaScript function that will be called when the mouse hovers away from the TreeView.
Public propertyOnClientMouseOver
The name of the JavaScript function that will be called when the user highlights a treenode.
Public propertyOnClientNodeAnimationEnd
Gets or sets the name of the JavaScript function called when a node's expand/collapse animation finishes
Public propertyOnClientNodeChecked
The name of the JavaScript function that will be called after the user checks (checkbox) a treenode.
Public propertyOnClientNodeChecking
The name of the JavaScript function that will be called when the user checks (checkbox) a treenode.
Public propertyOnClientNodeClicked
The name of the JavaScript function that will be called after click on a treenode. Used for AJAX/callback hooks.
Public propertyOnClientNodeClicking
The name of the JavaScript function that will be called upon click on a treenode. The function must accept a single parameter which is the instance of the node clicked. For example if you define OnClientClick="ProcessClientClick", you must define a javascript function defined in the following way (example):

function ProcessClientClick(node) { alert("You clicked on: " + node.Text); }
Public propertyOnClientNodeCollapsed
The name of the JavaScript function that will be called after a node is collapsed.
Public propertyOnClientNodeCollapsing
The name of the JavaScript function that will be called before a node is collapsed.
Public propertyOnClientNodeDataBound
Gets or sets the name of the JavaScript function called when a node is databound during load on demand
Public propertyOnClientNodeDragging
The name of the JavaScript function that will be called when the user moves the mouse while dragging a node.
Public propertyOnClientNodeDragStart
The name of the JavaScript function that will be called when the user starts dragging a node.
Public propertyOnClientNodeDropped
The name of the JavaScript function that will be called after the user drops a node onto another node.
Public propertyOnClientNodeDropping
The name of the JavaScript function that will be called when the user drops a node onto another node.
Public propertyOnClientNodeEdited
The name of the JavaScript function that will be called after the user edits a node
Public propertyOnClientNodeEditing
The name of the JavaScript function that will be called before the user edits a node
Public propertyOnClientNodeEditStart
Gets or sets the name of the JavaScript function called when a node starts being edited
Public propertyOnClientNodeExpanded
The name of the JavaScript function that will be called after a node is expanded.
Public propertyOnClientNodeExpanding
The name of the JavaScript function that will be called before a node is expanded.
Public propertyCode exampleOnClientNodePopulated
Gets or sets a value indicating the client-side event handler that is called when the children of a tree node were just populated (for example from web service).
Public propertyCode exampleOnClientNodePopulating
Gets or sets a value indicating the client-side event handler that is called when the children of a tree node are about to be populated (for example from web service).
Public propertyCode exampleOnClientNodePopulationFailed
Gets or sets a value indicating the client-side event handler that is called when the operation for populating the children of a tree node has failed.
Public propertyPersistLoadOnDemandNodes
When set to true, the nodes populated through Load On Demand are persisted on the server.
Public propertyPostBackUrl
Gets or sets the URL of the page to post to from the current page when a tree node is clicked.
(Overrides ControlItemContainerPostBackUrl.)
Public propertyCode exampleSelectedNode
Gets a KaxTreeNode object that represents the selected node in the KaxTreeView control.
Public propertySelectedNodes
Gets a collection of KaxTreeNode objects that represent the nodes in the control that are currently selected.
Public propertySelectedValue
Gets the Value of the selected node.
Public propertyShowLineImages
Gets a value indicating whether the dotted lines indenting the nodes should be displayed or not.
Public propertySingleExpandPath
Gets a value indicating whether only the current branch of the treeview is expanded.
Public propertyTriStateCheckBoxes
Gets or sets a value indicating whether KaxTreeView should display tri-state checkboxes.
Public propertyUniqueID (Overrides ControlUniqueID.)
Public propertyWebServiceSettings
Gets the settings for the web service used to populate nodes when ExpandMode set to TreeNodeExpandMode.WebService.
Top
Events
  NameDescription
Public eventContextMenuItemClick
Occurs on the server when a item in the KaxTreeViewContextMenu is clicked.
Public eventNodeCheck
Occurs when a node is checked.
Public eventCode exampleNodeClick
Occurs on the server when a node in the KaxTreeView control is clicked.
Public eventNodeCollapse
Occurs when a node is collapsed.
Public eventCode exampleNodeCreated
Occurs when a node is created.
Public eventCode exampleNodeDataBound
Occurs when a node is data bound.
Public eventCode exampleNodeDrop
Occurs when a node (or nodes) is dragged and dropped.
Public eventCode exampleNodeEdit
Occurs when a node's text is edited.
Public eventCode exampleNodeExpand
Occurs when a node is expanded.
Public eventCode exampleTemplateNeeded
Occurs before template is being applied to the node.
Top
Remarks

The KaxTreeView control is used to display a list of nodes in a Web Forms page. The KaxTreeView control supports the following features:

  • Danodeinding that allows the control to be populated from various datasources.
  • Programmatic access to the KaxTreeView object model which allows dynamic creation of treeviews, populating with nodes and customizing the behavior by various properties.
  • Customizable appearance through built-in or user-defined skins.

nodes

The KaxTreeView control is made up of tree of nodes represented by KaxTreeNode objects. Nodes at the top level (level 0) are called root nodes. An node that has a parent node is called a child node. All root nodes are stored in the Nodes property of the KaxTreeView control. Child nodes are stored in the Nodes property of their parent KaxTreeNode.

Each node has a Text and a Value property. The value of the Text property is displayed in the KaxTreeView control, while the Value property is used to store any additional data about the node, such as data passed to the postback event associated with the node. When clicked, a node can navigate to another Web page indicated by the NavigateUrl property.

See Also