Type | Description | |||
Node as Node | A Node object whose value is chaning. | |||
NewValue as Variant | (By Reference) A Variant expression that indicates the newly node's value. |
The NewValue parameter indicates the newly node's value before assigning it to the Value property. You can use the Value property to get the old node's value.
The edit events are fired in the following order:
Edit event. Prevents editing nodes, before showing the node's editor.
EditOpen event. The edit operation started, the node's editor is shown. The Editing property gives the window's handle of the built-in editor being shown.
Change event. The Change event is fired only if the user types ENTER key, the user selects a new value from a predefined data list, or focus a new node.
EditClose event. The node's editor is hidden and closed.
If a node has an editor assigned the node's editor is applied to the:
Syntax for Change event, /NET version, on:
private void Change(object sender,exontrol.EXMLGRIDLib.Node Node,ref object NewValue) { } Private Sub Change(ByVal sender As System.Object,ByVal Node As exontrol.EXMLGRIDLib.Node,ByRef NewValue As Object) Handles Change End Sub |
private void Change(object sender, AxEXMLGRIDLib._IXMLGridEvents_ChangeEvent e) { } void OnChange(LPDISPATCH Node,VARIANT FAR* NewValue) { } void __fastcall Change(TObject *Sender,Exmlgridlib_tlb::INode *Node,Variant * NewValue) { } procedure Change(ASender: TObject; Node : INode;var NewValue : OleVariant); begin end; procedure Change(sender: System.Object; e: AxEXMLGRIDLib._IXMLGridEvents_ChangeEvent); begin end; begin event Change(oleobject Node,any NewValue) end event Change Private Sub Change(ByVal sender As System.Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_ChangeEvent) Handles Change End Sub Private Sub Change(ByVal Node As EXMLGRIDLibCtl.INode,NewValue As Variant) End Sub Private Sub Change(ByVal Node As Object,NewValue As Variant) End Sub LPARAMETERS Node,NewValue PROCEDURE OnChange(oXMLGrid,Node,NewValue) RETURN |
<SCRIPT EVENT="Change(Node,NewValue)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function Change(Node,NewValue) End Function </SCRIPT> Procedure OnComChange Variant llNode Variant llNewValue Forward Send OnComChange llNode llNewValue End_Procedure METHOD OCX_Change(Node,NewValue) CLASS MainDialog RETURN NIL void onEvent_Change(COM _Node,COMVariant /*variant*/ _NewValue) { } function Change as v (Node as OLE::Exontrol.XMLGrid.1::INode,NewValue as A) end function function nativeObject_Change(Node,NewValue) return |
The following VB sample assign a drop down editor to a cell and displays the newly value when user selects a new value from the drop down portion of the editor:
Private Sub Form_Load() With XMLGrid1 .BeginUpdate With .Editors With .Add("DD", DropDownListType) .AddButton "A", 1 .AddButton "B", 1, RightAlignment .AddItem 1, "<b>1</b> One" .AddItem 2, "<b>2</b> One" .AddItem 3, "<b>3</b> One" End With End With With .Nodes With .Add("Select", 1) .Editor = "DD" End With End With .EndUpdate End With End Sub Private Sub XMLGrid1_Change(ByVal Node As EXMLGRIDLibCtl.INode, NewValue As Variant) Debug.Print "NewValue = " & NewValue End Sub
The following C++ sample displays the value that user changes:
#include "Node.h" void OnChangeXmlgrid1(LPDISPATCH Node, VARIANT FAR* NewValue) { CNode node( Node ); node.m_bAutoRelease = FALSE; CString strNewValue = V2S( NewValue ); OutputDebugString( strNewValue ); }
where the V2S function converts a VARIANT expression to a string expression:
static CString V2S( const VARIANT* pvtValue ) { COleVariant vtString; vtString.ChangeType( VT_BSTR, (VARIANT*)pvtValue ); return V_BSTR( &vtString ); }
The following VB.NET sample displays the value that user changes:
Private Sub AxXMLGrid1_Change(ByVal sender As Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_ChangeEvent) Handles AxXMLGrid1.Change Debug.Write(e.newValue.ToString()) End Sub
The following C# sample displays the value that user changes:
private void axXMLGrid1_Change(object sender, AxEXMLGRIDLib._IXMLGridEvents_ChangeEvent e) { System.Diagnostics.Debug.Write(e.newValue.ToString()); }
The following VFP sample displays the value that user chages:
*** ActiveX Control Event *** LPARAMETERS node, newvalue wait window nowait newValue