event AddNode (NewNode as Node)
Occurs when a node is added to the nodes collection.

TypeDescription
NewNode as Node A Node object being inserted.
The AddNode event notifies your application that user adds a new node. Use the Add method to insert a new node to the Nodes collection. Use the Nodes property to access the control's nodes collection. Use the AddNode event to associate extra data to the newly inserted node. Use the Add method to add new type of editors to the control. Use the Editor property to assign an editor to a node.

Syntax for AddNode event, /NET version, on:

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

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

Syntax for AddNode event, /COM version, on:

private void AddNode(object sender, AxEXMLGRIDLib._IXMLGridEvents_AddNodeEvent e)
{
}

void OnAddNode(LPDISPATCH NewNode)
{
}

void __fastcall AddNode(TObject *Sender,Exmlgridlib_tlb::INode *NewNode)
{
}

procedure AddNode(ASender: TObject; NewNode : INode);
begin
end;

procedure AddNode(sender: System.Object; e: AxEXMLGRIDLib._IXMLGridEvents_AddNodeEvent);
begin
end;

begin event AddNode(oleobject NewNode)
end event AddNode

Private Sub AddNode(ByVal sender As System.Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_AddNodeEvent) Handles AddNode
End Sub

Private Sub AddNode(ByVal NewNode As EXMLGRIDLibCtl.INode)
End Sub

Private Sub AddNode(ByVal NewNode As Object)
End Sub

LPARAMETERS NewNode

PROCEDURE OnAddNode(oXMLGrid,NewNode)
RETURN

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

<SCRIPT EVENT="AddNode(NewNode)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function AddNode(NewNode)
End Function
</SCRIPT>

Procedure OnComAddNode Variant llNewNode
	Forward Send OnComAddNode llNewNode
End_Procedure

METHOD OCX_AddNode(NewNode) CLASS MainDialog
RETURN NIL

void onEvent_AddNode(COM _NewNode)
{
}

function AddNode as v (NewNode as OLE::Exontrol.XMLGrid.1::INode)
end function

function nativeObject_AddNode(NewNode)
return

The following VB sample assigns a default editors to all nodes, using the AddNode event:

Private Sub Form_Load()
    With XMLGrid1
        .BeginUpdate
        
        With .Editors
            With .Add("Edit", EditType)
                .Appearance = SingleApp
            End With
        End With
        
        With .Nodes
            With .Add("Root").Nodes
                .Add "Child 1", "text1"
                .Add "Child 2", "text2"
            End With
        End With
        .EndUpdate
    End With
End Sub

Private Sub XMLGrid1_AddNode(ByVal NewNode As EXMLGRIDLibCtl.INode)
    NewNode.Editor = "Edit"
End Sub

The following C++ sample assigns a default editors to all nodes, using the AddNode event:

#include "Node.h"
void OnAddNodeXmlgrid1(LPDISPATCH NewNode) 
{
	CNode node( NewNode ); node.m_bAutoRelease = FALSE;
	node.SetEditor( COleVariant( "Edit" ) );
}

The following VB.NET sample assigns a default editors to all nodes, using the AddNode event:

Private Sub AxXMLGrid1_AddNode(ByVal sender As System.Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_AddNodeEvent) Handles AxXMLGrid1.AddNode
    e.newNode.Editor = "Edit"
End Sub

The following C# sample assigns a default editors to all nodes, using the AddNode event:

private void axXMLGrid1_AddNode(object sender, AxEXMLGRIDLib._IXMLGridEvents_AddNodeEvent e)
{
	e.newNode.Editor = "Edit";
}

The following VFP sample assigns a default editors to all nodes, using the AddNode event:

*** ActiveX Control Event ***
LPARAMETERS newnode

with newnode
	.Editor = "Edit"
endwith