_XDocument2.IsDirty Property

Definition

Gets a value that indicates whether the data in a form has been modified since it was last saved.

public:
 property bool IsDirty { bool get(); };
public bool IsDirty { get; }
member this.IsDirty : bool
Public ReadOnly Property IsDirty As Boolean

Property Value

Implements

Examples

In the following example, the IsDirty property of the XDocument object is used to determine whether data in the form has been changed:

if (thisXDocument.<span class="label">IsDirty</span>)
{
 thisXDocument.UI.Alert("Data has been changed.");
}
else
{
 thisXDocument.UI.Alert("Data has not been changed.");
}

In the following example, the IsDirty property of the XDocument object is used to determine whether data in the form has been changed:

if (thisXDocument.<span class="label">IsDirty</span>)
{
 thisXDocument.UI.Alert("Data has been changed.");
}
else
{
 thisXDocument.UI.Alert("Data has not been changed.");
}

Remarks

If the IsDirty property is true, data in the form's underlying XML document has been changed since it was last saved. If false, no changes have occurred.

Note: Changes that occur during an OnLoad event will not result in the IsDirty property being set to true.

Important: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Applies to