| TREEGEN COMPONENT 4.01 |
| Attributes
Object Last modified: April 6,1999 © 2000 Advantys. All rights reserved. |
The Count property returns the number of elements in the collection.
Syntax
.CountReturn Values
Returns an Long value which is the number of elements in the collection.Examples
<%
Response.Write("NbAttributes=" & MyItem.Attributes.Count)
%>
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)
%>
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.