property Node.Selected as Boolean
Specifies whether the node is selected.

TypeDescription
Boolean A boolean expression that indicates whether the node is selected. 
Use the Selected property to select a node. Use the SelectCount property to get the number of selected nodes. Use the SelectedNode property to get the selected node by its index. The ClearSel method clears the collection of selected nodes. 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 selects the node over the cursor as soon as the user moves the cursor over the control:

Private Sub XMLGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With XMLGrid1
        Dim n As EXMLGRIDLibCtl.Node
        Set n = .NodeFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY)
        If Not n Is Nothing Then
            n.Selected = True
        End If
    End With
End Sub

The following C++ sample selects the node over the cursor as soon as the user moves the cursor over the control:

#include "Node.h"
void OnMouseMoveXmlgrid1(short Button, short Shift, long X, long Y) 
{
	CNode node = m_xmlgrid.GetNodeFromPoint( X, Y );
	if ( node.m_lpDispatch != NULL )
		node.SetSelected( TRUE );
}

The following VB.NET sample selects the node over the cursor as soon as the user moves the cursor over the control:

Private Sub AxXMLGrid1_MouseMoveEvent(ByVal sender As Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_MouseMoveEvent) Handles AxXMLGrid1.MouseMoveEvent
    With AxXMLGrid1
        Dim n As EXMLGRIDLib.Node = .get_NodeFromPoint(e.x, e.y)
        If Not n Is Nothing Then
            n.Selected = True
        End If
    End With
End Sub

The following C# sample selects the node over the cursor as soon as the user moves the cursor over the control:

private void axXMLGrid1_MouseMoveEvent(object sender, AxEXMLGRIDLib._IXMLGridEvents_MouseMoveEvent e)
{
	EXMLGRIDLib.Node node = axXMLGrid1.get_NodeFromPoint(e.x, e.y);
	if (node != null)
		node.Selected = true;
}

The following VFP sample selects the node over the cursor as soon as the user moves the cursor over the control:

*** ActiveX Control Event ***
LPARAMETERS button, shift, x, y

with thisform.XMLGrid1
	n = .NodeFromPoint(x, y )
	if ( !isnull(n) )
		n.Selected = .t.
	endif
endwith