property XMLGrid.SelectedNode ([Index as Variant]) as Node
Retrieves the selected node.

TypeDescription
Index as Variant A long expression that indicates the index of selected node
Node A Node object being requested.
Use the SelectedNode property to retrieve the selected node giving its index in the selected nodes collection. Use the SelectCount property to get the number of selected nodes. Use the Selected property to select a node. Use the SelForeColor, SelForeColorChild, SelBackColor, SelBackColorChild properties to customize the colors for selected nodes. Use the FocusNode property to retrieve the focused node. Use the SingleSel property to specify whether the control support single or multiple selection. The control fires the SelectionChanged event when user changes the selection.

The following VB sample enumerates the selected node(s):

With XMLGrid1
    Dim i As Long
    For i = 0 To .SelectCount - 1
        Debug.Print .SelectedNode(i).Name
    Next
End With

The following C++ sample enumerates the selected node(s):

for ( long i = 0; i < m_xmlgrid.GetSelectCount(); i++ )
{
	CNode node = m_xmlgrid.GetSelectedNode( COleVariant( i ) );
	OutputDebugString( node.GetName() );
}

The following VB.NET sample enumerates the selected node(s):

With AxXMLGrid1
    Dim i As Long
    For i = 0 To .SelectCount - 1
        Debug.Write(.get_SelectedNode(i).Name())
    Next
End With

The following C# sample enumerates the selected node(s):

for (int i = 0; i < axXMLGrid1.SelectCount; i++)
{
	EXMLGRIDLib.Node node = axXMLGrid1.get_SelectedNode(i);
	System.Diagnostics.Debug.Write(node.Name);
}

The following VFP sample enumerates the selected node(s):

With thisform.XMLGrid1
    local i
    For i = 0 To .SelectCount - 1
        wait window nowait .SelectedNode(i).Name
    Next
EndWith