obout inc

Please ask any questions support@obout.com . See HOW-TO and Help page.

Add Method

Adds a Node to a TreeView.

Syntax

object.Add ParentId, Id, TextOrHTML, [Expanded], [imgSrc], [sNodeSubTreeURL]

The Add method syntax has these parts:

Part Description
Object Required. A TreeView object.
Classic Pro: Set oTree = Server.CreateObject("obout_ASPTreeView_Pro.Tree")
XP: Set oTree = Server.CreateObject("obout_ASPTreeView_XP.Tree")
ParentId Required. Id of parent Node (to which it will be attached).
Classic: Should be empty string "" in first Node. Only one for Classic.
XP: Should be "root" in first root Nodes. Could be many.
Id Required. A unique string that specifies the Node.
Begins with character, not digit. Like "a1", "a2", etc.
Classic: Should be "root" in a very first Node (One "root" in Classic).
TextOrHTML Required. The string or HTML code that appears in the Node.
Expanded Optional. True for expanded, False for collapsed. Default is collapsed.
imgSrc Optional. The image file name of the "icon".
"book.gif"
sNodeSubTreeURL Optional. To load Node dynamically from different file, just set URL to loading asp page. For XP and Classic Pro only.
"../subnode5.asp" See XP Example and Classic Pro Example.

Note:
There is the difference in using ParentId and Id for very first Node between Classic and XP styles.

 

Please ask any questions support@obout.com . See HOW-TO and Help page.