FlyTreeView for ASP.NET
Overview
Demos
Download
Quick Start
Documentation
Purchase
Support
Client-Side Scripting
Server-Side Programming

Client-Side Objects

The FlyTreeView control has several main client runtime classes:

CFlyTreeView members

NameDescription
[CFlyTreeView] getInstance(element) (STATIC) Returns FlyTreeView client-side instance from specified html element of FlyTreeView.
[CFlyTreeView] getInstanceById(elementId) (STATIC) Returns FlyTreeView client-side instance from element having specified Id value.
[string] getID() Gets client ID of the FlyTreeView
[CFlyTreeNode] findByID(nodeID) Returns a node instance with a provided id
[CFlyTreeNode] find(nodeConditionFunc) Recursively searches for child nodes and returns the first occurrence of node that matches required condition.
Example: myTreeView.find(function(node) { return node.getText() == 'Program Files'; })
[array] findAll(nodeConditionFunc) Recursively searches for child nodes and returns an array of child nodes that match required condition.
Example: myTreeView.findAll(function(node) { return node.getChecked() == true; })
[CFlyTreeNode] findByValue(nodeValue) Recursively searches for child nodes and returns the first occurrence of node having provided Value
[array] findAllByValue(nodeValue) Recursively searches for child nodes and returns an array of nodes having provided Value
[CFlyTreeNode] findByPath(nodePath) Recursively searches for child nodes and returns the first occurrence of node having provided getPath() result
[array] findAllByPath(nodePath) Recursively searches for child nodes and returns an array of nodes having provided getPath() result
[array] getNodes() Returns root nodes array
[array] clearNodes() Removes all nodes from treeview
[CFlyTreeNode] getSelectedNode() Returns selected node instance of the treeview
addNode(node) Appends node to the nodes collection of treeview
insertNode(node, index) Inserts node into the nodes collection of treeview into specified position
[string] getRootDragDropAcceptNames() Gets the root drop zone accept names
setRootDragDropAcceptNames(value) Sets the root drop zone accept names
postBack() Forces treeview to postback the page


CFlyTreeNode members

NameDescription
[string] getID() Returns node unique ID
[number] getLevel() Returns depth level of the node
[number] getIndex() Returns index of the node
[CFlyTreeNode] getParent() Returns parent node
[HTMLElement] getElement() Returns node container DIV element.
[array] getSiblingNodes() Returns sibling nodes array
[CFlyTreeView] getTreeView() Returns container CFlyTreeView instance
[array] getChildNodes() Returns child nodes array
[array] clearChildNodes() Removes all child nodes
[string] getText() Returns Text property value
setText(value) Sets Text property value
[string] getValue() Returns Value property value
setValue(value) Sets Value property
[string] getPath() Returns the value path to node
[string] getContextMenuID() Returns the ID of the context menu to be used with the node
setContextMenuID(value) Sets the ID of the context menu to be used with the node
[string] getNavigateTarget() Returns NavigateTarget property value
setNavigateTarget(value) Sets NavigateTarget property value
[string] getNavigateUrl() Returns NavigateUrl property value
setNavigateUrl(value) Sets NavigateUrl property value
[string] getDragDropAcceptNames() Returns a comma separated list of accepted drag-and-drop names
setDragDropAcceptNames(value) Sets a comma separated list of accepted drag-and-drop names
[string] getDragDropName() Returns the drag-and-drop name of the node
setDragDropName(value) Sets the drag-and-drop name of the node
[boolean] getPopulateNodesOnDemand() Returns PopulateNodesOnDemand property value
setPopulateNodesOnDemand(value) Sets PopulateNodesOnDemand property value
[boolean] getCanBeSelected() Returns CanBeSelected property value
setCanBeSelected(value) Sets CanBeSelected property value
[string] getTooltip() Returns Tooltip property value
setTooltip(value) Sets Tooltip property value
[string] getImageUrl() Returns ImageUrl property value
setImageUrl(value) Sets ImageUrl property value
[string] getAttribute(name) Returns named node attribute value, that are set through FlyTreeNode.Attributes key-value collection
setAttribute(name, value) Sets named node attribute value. The changes also reflect at server side
[object] getClientRect() Returns object containing client bounds of node HTML element. It contains the following properties: top, left, right, bottom, width and height
[string] getNodeTypeID() Returns nodetype id of the node
setNodeTypeID(value) Sets nodetype id of the node. Can be applied only to nodes without owner treeview (detached).
[boolean] getExpanded() Returns true if the node is expanded, otherwise false
[boolean] getChecked() Returns true if the node is checked, otherwise false
setChecked(value) Checks or unchecks the node depending on a property value
[boolean] getCanBeSelected() Returns true if the node is selectable, otherwise false
setCanBeSelected(value) Sets value indicating wether the node is selectable
expand() Expands node
collapse() Collapses node
toggle() Toggles node
select() Selects node
deselect() Deselects node
remove() Removes node from treeview
[CFlyTreeNode] find(nodeConditionFunc) Recursively searches for child nodes and returns the first occurrence of node that matches required condition.
Example: myNode.find(function(node) { return node.getText() == 'Program Files'; })
[array] findAll(nodeConditionFunc) Recursively searches for child nodes and returns an array of child nodes that match required condition.
Example: myNode.findAll(function(node) { return node.getChecked() == true; })
[CFlyTreeNode] findByValue(nodeValue) Recursively searches for child nodes and returns the first occurrence of node having provided Value
[array] findAllByValue(nodeValue) Recursively searches for child nodes and returns an array of nodes having provided Value
[CFlyTreeNode] findByPath(nodePath) Recursively searches for child nodes and returns the first occurrence of node having provided getPath() result
[array] findAllByPath(nodePath) Recursively searches for child nodes and returns an array of nodes having provided getPath() result
addNode(node) Appends node to the child nodes collection of the node
insertNode(node, index) Inserts node into the child nodes collection of the node at the specified index
moveTo(parent, index) Moves node into child nodes of specified parent at specified index
[CFlyTreeNode] clone() Creates a deep copy of the node


CFlyContextMenu members

NameDescription
[array] getItems() Returns an array of CFlyMeniItem objects.


CFlyMenuItem members

NameDescription
[string] getText() Returns Text property value
setText(value) Sets Text property value
[string] getCommandName() Returns CommandName property value
[boolean] getDisabled() Returns Disabled property value
setDisabled(value) Sets Disabled property value
[boolean] getAutoPostBack() Returns AutoPostBack property value
setAutoPostBack(value) Sets AutoPostBack property value
[string] getJavascript() Returns Javascript property value
[boolean] getIsSeparator() Returns IsSeparator property value

Note: All setXXX(value) methods having correnspondent FlyTreeNode.XXX properties reflect their client-side changes onto correspondent server-side properties.




Valid XHTML 1.1
© 2001-2010 9Rays.Net, Inc.