Click or drag to resize
KaxTreeNode Class
Represents a node in the KaxTreeView control.
Inheritance Hierarchy
SystemObject
  System.Web.UIControl
    System.Web.UI.WebControlsWebControl
      Kettic.AspNet.ControlsControlItem
        Kettic.AspNet.ControlsNavigationItem
          Kettic.AspNet.ControlsKaxTreeNode

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 KaxTreeNode : NavigationItem, 
	IKaxTreeNodeContainer, ICloneable

The KaxTreeNode type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleKaxTreeNode
Initializes a new instance of the KaxTreeNode class.
Public methodCode exampleKaxTreeNode(String)
Initializes a new instance of the KaxTreeNode class with the specified text data.
Public methodCode exampleKaxTreeNode(String, String)
Initializes a new instance of the KaxTreeNode class with the specified text and value.
Public methodCode exampleKaxTreeNode(String, String, String)
Initializes a new instance of the KaxTreeNode class with the specified text, value and URL.
Top
Methods
  NameDescription
Public methodCheckChildNodes
Checks all child nodes of the current node.
Public methodClone
Creates a copy of the current KaxTreeNode object.
Public methodCollapseChildNodes
Collapses recursively all child nodes of the node.
Public methodCollapseParentNodes
Expands all parent nodes of the node.
Public methodExpandChildNodes
Expands all child nodes of the node.
Public methodExpandParentNodes
Expands all parent nodes of the node.
Public methodGetAllNodes
Gets a linear list of all nodes in the KaxTreeNode.
Public methodGetFullPath
Returns the full path (location) of the node delimited by the specified character.
Public methodInsertAfter
Inserts a node after the current node.
Public methodInsertBefore
Inserts a node before the current node.
Public methodIsAncestorOf
Checks if the current node is ancestor of another node.
Public methodIsDescendantOf
Checks if the current node is descendant of another node node.
Public methodCode exampleRemove
Removes the node from the Nodes collection of its parent
Public methodToggle
Toggles Expand/Collapse state of the node.
Public methodUncheckChildNodes
Unchecks all child nodes of the current node.
Top
Properties
  NameDescription
Public propertyAllowDrag
Gets or sets a value indicating whether the node can be dragged and dropped.
Public propertyAllowDrop
Gets or sets a value indicating whether the use can drag and drop nodes over this node.
Public propertyAllowEdit
Gets or sets a value indicating whether the use can edit the text of the node.
Public propertyCode exampleCategory
Gets or sets the category of the node.
Public propertyCheckable
Gets or sets a value indicating whether the node is checkable. A checkbox control is rendered for checkable nodes.
Public propertyChecked
Gets or sets a value indicating whether the node is checked or not.
Public propertyCheckState
Gets the checked state of the tree node
Public propertyContentCssClass
Gets or sets the Cascading Style Sheet (CSS) class applied to the content wrapper of the node.
Public propertyContextMenuID
Gets or sets a value indicating the ID of the KaxTreeViewContextMenu displayed for the current node.
Public propertyCssClass
Gets or sets the Cascading Style Sheet (CSS) class applied by default to the node.
(Overrides WebControlCssClass.)
Public propertyCode exampleDataItem
Gets the data item that is bound to the node
(Overrides ControlItemDataItem.)
Public propertyDisabledCssClass
Gets or sets the Cascading Style Sheet (CSS) class applied to the node when it is disabled.
Public propertyDisabledImageUrl
Gets or sets a value specifying the URL of the image rendered when the node is disabled.
Public propertyEnableContextMenu
Gets or sets a value indicating whether a context menu should be displayed for the current node.
Public propertyEnabled
Gets or sets a value indicating whether the node is enabled.
(Overrides ControlItem.Enabled.)
Public propertyExpanded
Gets or sets a value indicating whether the node is expanded.
Public propertyExpandedImageUrl
Gets or sets a value specifying the URL of the image rendered when the node is expanded.
Public propertyExpandMode
Gets or sets the expand behavior of the tree node. When set to ExpandMode.ServerSide the KaxTreeView will fire a server event (NodeExpand) so you can populate the node on demand.
Public propertyFullPath
Gets the full path (location) of the node.
Public propertyHoveredCssClass
Gets or sets the Cascading Style Sheet (CSS) class applied to the node when the mouse hovers it.
Public propertyHoveredImageUrl
Gets or sets a value specifying the URL of the image rendered when the node is hovered with the mouse.
(Overrides NavigationItemHoveredImageUrl.)
Public propertyCode exampleImageUrl
Gets or sets the URL to an image which is displayed next to the text of a node.
(Overrides NavigationItemImageUrl.)
Public propertyLevel
Gets the level of the node.
Public propertyLongDesc
A Section 508 element
Public propertyNavigateUrl
Gets or sets the URL to navigate to when the current node is clicked.
(Overrides NavigationItemNavigateUrl.)
Public propertyNext
Gets the next sibling of the node.
Public propertyCode exampleNodes
Gets a KaxTreeNodeCollection object that contains the child nodes of the current KaxTreeNode.
Public propertyCode exampleNodeTemplate
Gets or sets the template for displaying the node.
Public propertyOwner
Public propertyParentNode
Gets the parent node of the current node.
Public propertyPostBack
Gets or sets a value indicating whether clicking on the node will postback.
Public propertyPrev
Gets the previous sibling of the node. Gets the previous node sibling in the tree structure or returns null if this is the first node in the respective node group.
Public propertySelected
Gets or sets a value indicating whether the node is selected.
Public propertySelectedCssClass
Gets or sets the Cascading Style Sheet (CSS) class applied when node is selected.
Public propertySelectedImageUrl
Gets or sets a value specifying the URL of the image rendered when the node is selected.
Public propertyCode exampleTarget
Gets or sets the target window or frame in which to display the Web page content associated with the current node.
(Overrides NavigationItemTarget.)
Public propertyText
Gets or sets the text displayed for the current node.
(Overrides ControlItemText.)
Public propertyToolTip
Gets or sets the tooltip shown for the node when the user hovers it with the mouse
(Overrides WebControlToolTip.)
Public propertyTreeView
Gets the KaxTreeView which the node is part of.
Public propertyValue
Gets or sets custom (user-defined) data associated with the current node.
(Overrides ControlItemValue.)
Top
Remarks

The KaxTreeView control is made up of nodes. Nodes which are immediate children of the treeview are root nodes. Nodes which are children of root nodes are child nodes.

A node usually stores data in two properties, the Text property and the Value property. The value of the Text property is displayed in the KaxTreeView control, and the Value property is used to store additional data.

To create tree nodes, use one of the following methods:

  • Use declarative syntax to define nodes inline in your page or user control.
  • Use one of the constructors to dynamically create new instances of the KaxTreeNode class. These nodes can then be added to the Nodes collection of another node or treeview.
  • Data bind the KaxTreeView control to a data source.

When the user clicks a tree node, the KaxTreeView control can navigate to a linked Web page, post back to the server or select that node. If the NavigateUrl property of a node is set, the KaxTreeView control navigates to the linked page. By default, a linked page is displayed in the same window or frame. To display the linked content in a different window or frame, use the Target property.

See Also