_DataDOMEventSink_Event.OnAfterChange Event
Occurs after changes to a form's underlying XML document have been accepted and after the OnValidate event has occurred.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Event OnAfterChange As _DataDOMEventSink_OnAfterChangeEventHandler
'Usage
Dim instance As _DataDOMEventSink_Event
Dim handler As _DataDOMEventSink_OnAfterChangeEventHandler
AddHandler instance.OnAfterChange, handler
event _DataDOMEventSink_OnAfterChangeEventHandler OnAfterChange
Remarks
This event handler does not allow users to cancel an operation.
The OnAfterChange event is typically used for changing data in a form after other changes have occurred — for example, making calculations or changing the structure of a form's underlying XML document.
Note
In some cases, events related to changes in a form's underlying XML document may occur more than once. For example, when existing data is changed, an insert and delete operation occurs.
Examples
[InfoPathEventHandler(MatchPath="/my:myFields/my:field1", EventType=InfoPathEventType.OnAfterChange)]
public void field1_OnAfterChange(DataDOMEvent e)
{
if (e.IsUndoRedo)
{
// An undo or redo operation has occurred and the DOM is read-only.
return;
}
CalculateTotalCampaignCost();
}
See Also
Reference
_DataDOMEventSink_Event Interface