![]() | Type | Description | ||
| NewNode as Node | A Node object being inserted. |
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