Share via


DataDOMEvent.Operation Property

Gets the type of action that is applied to an XML Document Object Model (DOM) node during a data validation event.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
ReadOnly Property Operation As String
    Get
'Usage
Dim instance As DataDOMEvent
Dim value As String

value = instance.Operation
string Operation { get; }

Property Value

Type: System.String

Remarks

The values that the Operation property returns include Insert, Update, and Delete.

Important

This member can be accessed without restrictions.

Examples

In the following example, the Operation property of the DataDOMEventObject object is used to check the type of action that is occurring to avoid multiple notifications for updates made to node values:

[InfoPathEventHandler(MatchPath="/root/item", EventType=InfoPathEventType.OnAfterChange)]
public void item_OnAfterChange(DataDOMEvent e)
{
 if (!e.IsUndoRedo && e.Operation == "Delete"
  && e.Site.nodeName == "item" && 
  e.Source.nodeName == "item")
 {
  Calculate();
 }
}

See Also

Reference

DataDOMEvent Interface

DataDOMEvent Members

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace