property XMLGrid.Nodes as Nodes
Retrieves the Nodes collection.

 TypeDescription 
   Nodes A Nodes object that holds the control's nodes collection.  
Use the Nodes property to access the control's nodes collection. Use the Add method to add new nodes to the control. Use the Editors property to access the control's editors collection. Use the Editor property to assign an editor to a node. Use the Nodes property to access the node's child nodes collection. Use the ItemByPosition property to retrieve a node giving its position. Use the FirstNode property to retrieves the first child node, and the NextNode property to retrieve the next child node.

The following VB sample enumerates the nodes in the control ( including the child nodes ):

Private Sub enumerate(ByVal x As EXMLGRIDLibCtl.XMLGrid)
    With x.Nodes
        Dim i As Long
        For i = 0 To .Count - 1
            enumNodes .ItemByPosition(i)
        Next
    End With
End Sub

Private Sub enumNodes(ByVal n As EXMLGRIDLibCtl.node)
    Dim c As EXMLGRIDLibCtl.node
    Debug.Print n.Name
    Set c = n.FirstNode
    While Not c Is Nothing
        enumNodes c
        Set c = c.NextNode
    Wend
End Sub  

The enumerate function enumerates the root nodes in the control. The enumNodes function enumerates recursively the child nodes for each node.


Send comments on this topic.
1999-2015 Exontrol.COM, Software. All rights reserved.