Edit

Share via


_DataDOMEventSink_Event.OnAfterChange Event

Definition

Occurs after changes to a form's underlying XML document have been accepted and after the OnValidate event has occurred.

public:
 event Microsoft::Office::Interop::InfoPath::SemiTrust::_DataDOMEventSink_OnAfterChangeEventHandler ^ OnAfterChange;
event Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_OnAfterChangeEventHandler OnAfterChange;
member this.OnAfterChange : Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_OnAfterChangeEventHandler 
Event OnAfterChange As _DataDOMEventSink_OnAfterChangeEventHandler 

Event Type

Examples

[InfoPathEventHandler(MatchPath="/my:myFields/my:field1", EventType=InfoPathEventType.<span class="label">OnAfterChange</span>)]
public void field1_<span class="label">OnAfterChange</span>(DataDOMEvent e)
{
 if (e.IsUndoRedo)
 {
  // An undo or redo operation has occurred and the DOM is read-only.
  return;
 }

 CalculateTotalCampaignCost();
}
[InfoPathEventHandler(MatchPath="/my:myFields/my:field1", EventType=InfoPathEventType.<span class="label">OnAfterChange</span>)]
public void field1_<span class="label">OnAfterChange</span>(DataDOMEvent e)
{
 if (e.IsUndoRedo)
 {
  // An undo or redo operation has occurred and the DOM is read-only.
  return;
 }

 CalculateTotalCampaignCost();
}

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.

Applies to