Edit

Share via


SaveEvent.IsCancelled Property

Definition

Gets or sets a value that provides additional information for use in OnSaveRequest event in conjunction with the ReturnStatus property.

public:
 property bool IsCancelled { bool get(); void set(bool value); };
public bool IsCancelled { get; set; }
member this.IsCancelled : bool with get, set
Public Property IsCancelled As Boolean

Property Value

Examples

In the following example, the IsCancelled property of the SaveEventObject object is used to ensure that the document does not close if the save operation was cancelled:

e.<span class="label">IsCancelled</span> = e.PerformSaveOperation();
if(e.<span class="label">IsCancelled</span>)
    return;
e.ReturnStatus = true;

Remarks

When closing InfoPath, the user is prompted to save the document if the IsDirty property is true. If the IsCancelled property is true, InfoPath will be prevented from closing if the save operation fails (that is, the ReturnStatus property is false).

Applies to