TreeNode Class [Javascript]

Summary

Methods Description
getText Get a node text content.
setText Get a node text content.
getImageSrc Get src of image in a node.
setImageSrc Set src to the image of a node.
getData Get node attached data.
addData Add data to a node
getTree Get tree object of the node.
moveToAbove Move the node to above a node.
moveToBelow Move the node to above a node.
isSelected Check whether the node is selected
isExpanded Check whether the node is expanded
startEdit Start editing the node.
endEdit End editing the node.
expand Expand a node
collapse Collapse a node
select Select a node
unselect Unselect a node
getParentId Return the parent id of a node
getChildIds Return array of child ids of a node.
attachTo Attach this node to another node
loadSubTree Load a subtree to node.
disableSelect Set whether a node is select-disable. Collapse
disableDrag Set whether a node is select-disable.
disableDrop Set whether a node is select-disable.
disableEdit Set whether a node is select-disable.
addChildNode Add a new sub node to this node.

Methods Detail

getTextTop

string getText()

Get a node text content.

Show/Hide Code

Supported from version: 2.0.0.0

setTextTop

string setText(string content)

Get a node text content.

Show/Hide Code

Supported from version: 2.0.0.0

getImageSrcTop

string getImageSrc()

Get src of image in a node.

Show/Hide Code

Supported from version: 2.0.0.0

setImageSrcTop

void  setImageSrc(string imageSrc)

Set src to the image of a node.

Show/Hide Code

Supported from version: 2.0.0.0

getDataTop

string getData(string key)

Get node attached data.

Show/Hide Code

Supported from version: 2.0.0.0

addDataTop

string addData(string key, object value)

Add data to the node. Simply providing the key and the value, the data will be saved and retrieve later by getData function.

Show/Hide Code

Supported from version: 2.0.0.0

getTreeTop

KoolTreeView getTree()

Get tree object of the node.

Show/Hide Code

Supported from version: 2.0.0.0

moveToAboveTop

void moveToAbove(string NodeId)

Move the node to above a node.

Show/Hide Code

Supported from version: 2.0.0.0

moveToBelowTop

void moveToBelow(string NodeId)

Move the node to above a node.

Show/Hide Code

Supported from version: 2.0.0.0

isSelectedTop

bool isSelected()

Check whether the node is selected

Show/Hide Code

Supported from version: 2.0.0.0

isExpandedTop

bool isExpanded()

Check whether the node is expanded

Show/Hide Code

Supported from version: 2.0.0.0

startEditTop

void startEdit(string  initContent)

Start editing the node. If the initContent is specified, the node will be started edit with initContent string.

Show/Hide Code

Supported from version: 2.0.0.0

endEditTop

void endEdit(bool updated)

End editing the node, if the updated is true, content will be updated. If updated is false, update node content will be cancelled

Show/Hide Code

Supported from version: 2.0.0.0

expandTop

void expand()

Expand a node

Show/Hide Code

Supported from version: 2.0.0.0

collapseTop

void collapse()

Collapse a node

Show/Hide Code

Supported from version: 2.0.0.0

selectTop

void select()

Select a node

Show/Hide Code

Supported from version: 2.0.0.0

unselectTop

void unselect()

Unselect a node

Show/Hide Code

Supported from version: 2.0.0.0

getParentIdTop

string getParentId()

Return the parent id of a node

Show/Hide Code

Supported from version: 2.0.0.0

getChildIdsTop

array getChildIds()

Return array of child ids of a node.

Show/Hide Code

Supported from version: 2.0.0.0

attachToTop

void attachTo(string NodeId)

Attach this node to another node

Show/Hide Code

Supported from version: 2.0.0.0

loadSubTreeTop

void  loadSubTree(string url)

Load a subtree to node.

Show/Hide Code

Supported from version: 2.0.0.0

disableSelectTop

void disableSelect(bool disable)

Set whether a node is select-disable. Collapse

Show/Hide Code

Supported from version: 2.0.4.0

disableDragTop

void disableDrag(string disable)

Set whether a node is select-disable.

Show/Hide Code

Supported from version: 2.0.4.0

disableDropTop

void disableDrop(bool disable)

Set whether a node is select-disable.

Show/Hide Code

Supported from version: 2.0.4.0

disableEditTop

void disableEdit(bool disable)

Set whether a node is select-disable.

Show/Hide Code

Supported from version: 2.0.4.0

addChildNodeTop

void addChildNode(string id, string  text, string imagesrc)

Add a new sub node to this node.

Show/Hide Code

Supported from version: 2.0.4.0