event AfterExpandNode (Node as Node)
Notifies the application when a node is expanded or collapsed.

TypeDescription
Node as Node A Node object being expanded or collapsed.
Use the AfterExpandNode event to notify your application that a node is expanded or collapsed.  Use the Expanded property to programmatically expand or collapse a node. Use the Expanded property to find out if a node is expanded or collapsed. Use the ExpandAll method to expand all nodes in the control. Use the CollapseAll method to collapse all nodes in the control. Use the ExpandAll method to expand all child nodes of specified node. Use the CollapseAll method to collapse all child nodes of specified node. Use the BeforeExpandNode event to prevent expanding or collapsing a node.

Syntax for AfterExpandNode event, /NET version, on:

private void AfterExpandNode(object sender,exontrol.EXMLGRIDLib.Node Node)
{
}

Private Sub AfterExpandNode(ByVal sender As System.Object,ByVal Node As exontrol.EXMLGRIDLib.Node) Handles AfterExpandNode
End Sub

Syntax for AfterExpandNode event, /COM version, on:

private void AfterExpandNode(object sender, AxEXMLGRIDLib._IXMLGridEvents_AfterExpandNodeEvent e)
{
}

void OnAfterExpandNode(LPDISPATCH Node)
{
}

void __fastcall AfterExpandNode(TObject *Sender,Exmlgridlib_tlb::INode *Node)
{
}

procedure AfterExpandNode(ASender: TObject; Node : INode);
begin
end;

procedure AfterExpandNode(sender: System.Object; e: AxEXMLGRIDLib._IXMLGridEvents_AfterExpandNodeEvent);
begin
end;

begin event AfterExpandNode(oleobject Node)
end event AfterExpandNode

Private Sub AfterExpandNode(ByVal sender As System.Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_AfterExpandNodeEvent) Handles AfterExpandNode
End Sub

Private Sub AfterExpandNode(ByVal Node As EXMLGRIDLibCtl.INode)
End Sub

Private Sub AfterExpandNode(ByVal Node As Object)
End Sub

LPARAMETERS Node

PROCEDURE OnAfterExpandNode(oXMLGrid,Node)
RETURN

Syntax for AfterExpandNode event, /COM version (others), on:

<SCRIPT EVENT="AfterExpandNode(Node)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function AfterExpandNode(Node)
End Function
</SCRIPT>

Procedure OnComAfterExpandNode Variant llNode
	Forward Send OnComAfterExpandNode llNode
End_Procedure

METHOD OCX_AfterExpandNode(Node) CLASS MainDialog
RETURN NIL

void onEvent_AfterExpandNode(COM _Node)
{
}

function AfterExpandNode as v (Node as OLE::Exontrol.XMLGrid.1::INode)
end function

function nativeObject_AfterExpandNode(Node)
return

The following VB sample displays the caption of the node being expanded or collapsed:

Private Sub XMLGrid1_AfterExpandNode(ByVal Node As EXMLGRIDLibCtl.INode)
    Debug.Print "The '" & Node.Name & "' is " & IIf(Node.Expanded, "expanded", "collapsed") & "."
End Sub

The following C++ sample displays the caption of the node being expanded or collapsed:

#include "Node.h"
void OnAfterExpandNodeXmlgrid1(LPDISPATCH Node) 
{
	CNode node( Node ); node.m_bAutoRelease = FALSE;
	CString strFormat, strName = node.GetName();
	strFormat.Format( "The %s is %s.", strName, (node.GetExpanded() ? "expanded" : "collapsed" ) );
	OutputDebugString( strFormat );
}

The following VB.NET sample displays the caption of the node being expanded or collapsed:

Private Sub AxXMLGrid1_AfterExpandNode(ByVal sender As Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_AfterExpandNodeEvent) Handles AxXMLGrid1.AfterExpandNode
    Dim strMessage As String = "The " + e.node.Name + " is "
    strMessage = strMessage + (IIf(e.node.Expanded, "expanded", "collapsed"))
    Debug.Write(strMessage)
End Sub

The following C# sample displays the caption of the node being expanded or collapsed:

private void axXMLGrid1_AfterExpandNode(object sender, AxEXMLGRIDLib._IXMLGridEvents_AfterExpandNodeEvent e)
{
	String strMessage = "The " + e.node.Name + " is ";
	strMessage += (e.node.Expanded ? "expanded" : "collapsed");
	System.Diagnostics.Debug.Write(strMessage);
}

The following VFP sample displays the caption of the node being expanded or collapsed:

*** ActiveX Control Event ***
LPARAMETERS node

with node
	s = "The " + .Name + " is "
	if ( .Expanded )
		s = s + "expanded"
	else
		s = s + "collapsed"
	endif
	wait window nowait s
endwith