data grid control

Advanced Treeview Tree Menu

[ Tree Home] [ Buy Now ] [ Documentation ] [ Examples & Demos ] [ Help & Support ]

Advanced Treeview Tree Menu

Documentation - The Node Data

Creating a Node Data File

The tree nodes are specified within a single file. Each line in the data specifies a node on the tree and can contain up to 11 elements:-

Node ID - A unique node id for this node
Parent ID - The ID of the node to which this belongs or "root" if it is a top level node
text - The text of this node
URL - The link this node execute upon a click
Target - The name of the frame or window in which the link should open
Font - the font for this node text
Color - the color of the node text
Expanded - states whether this node is to be in it's expanded state or not upon startup
Normal Image - the normal state image icon
Expanded Image - the expanded state image icon
MouseOver Image - the image icon when the mouse passes over the node
Status Bar text - text to be displayed in the status bar when the mouse passes over this node

Each element in the node specification should be specified by a "|" character. The first three elements ( Node ID, Parent ID and Text) are mandatory and the rest may be omitted.

For the optional elements, if no value is specified then a default value will be assigned. Default values may be specified in the General Tree Parameters - see Parameter List»

As an example if we wish to specify 3 nodes A, B and C where A belongs to root and both B and C are to belong to A then we would have:-

A|root|Node A
B|A|Node B
C|A|Node C

For these nodes the remaining elements (eg. font, color etc) would all be assigned the default values. If we now wish to add in some link to nodes B and C we would do this:-

A|root|Node A
B|A|Node B|
C|A|Node C|

If you need to specify a "non-value" to an element (eg. if for node A you wish to specify a font but not a url or target) then this can be done by setting the element to be a single space character:-

A|root|Node A| | |Arial,N,12

Finally set the "Nodedata" parameter to the URL pointing to your node data file. eg.

<param name="Nodedata" value="">


Using a Server Side Process to Dynamically Generate the Node Data

Although above we have discussed building a static text file to hold the node data, the node data can also be supplied by a server side script (eg. PHP, ASP, JSP or Perl etc). This opens the possibility for the node data to be dynamically loaded from data held within a database.

Such a server side script may be constructed in any language of your choice. The only requirement is that the output of the script provides the node data in the format described above.

This opens up many possibilities for producing dynamic tree content. A script can be written to acquire data from virtually any data source, process the data and even generate node data based upon session data (ie. a user ID).

To configure the tree to acquire the node data from your own server side script simply set the "Nodedata" parameter to the URL pointing to your script. eg.

<param name="Nodedata" value="">

For and example of this click here»

« back to Getting Started
[ Tree Home] [ Buy Now ] [ Documentation ] [ Examples & Demos ] [ Help & Support ]

Getting Started



Buy Treeview Tree Menu