TREEGEN COMPONENT 4.01
Attributes Object
Last modified: April 6,1999 
© 2000 Advantys. All rights reserved.

Count

The Count property returns the number of elements in the collection.

Syntax
.Count

Return Values
Returns an Long value which is the number of elements in the collection.

Examples
<%
Response.Write("NbAttributes=" & MyItem.Attributes.Count)
%>


Item

The Item method access to a item in a collection. This is the default method of the collection object.

Syntax
.Item(key)

Return Values
Returns a Item object of the collection corresponding to the key.

Examples
<%
for intI=1 to MyItem.Attributes.count then
    Response.Write("Attribute Name=" & MyItem.Attributes.Item(intI).Name)
end if
' to retrieve the "myField" field of the table which is the datasource of myTree
Response.Write("MyField value=" & MyTree.Items(3).Attributes.Item("MyField").Value)

%>


Add

The Add method adds a new attribute in the collection.

Syntax
.Add(value, name)

Parameters
value is the value of the attribute (variant)
name is the name of the attribute (string)

Examples
<%
MyItem.Attributes.Add("myValue", "myField")
%>


© 2000 Advantys. All rights reserved.