IsDOMReadOnly Property

Microsoft Office InfoPath

Show All Show All

IsDOMReadOnly Property

A read-only property that returns a Boolean value that indicates whether the data in the underlying XML document of a Microsoft Office InfoPath 2003 form has been placed in a read-only state.

expression.IsDOMReadOnly

expression    Required. An expression that returns a reference to an XDocument object.

Security Level

2: 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.

Remarks

If the IsDOMReadOnly property is True, data in the form's underlying XML document is in a read-only state and cannot be changed. If False, the data in the form's underlying XML document can be changed.

To determine whether the form has been placed in a read-only state, use the IsReadOnly property of the XDocument object.

The data in a form's XML document will be placed in a read-only state in the following scenarios:

  • The form is digitally signed
  • The form is in Reduced Functionality Mode (RFM) mode
  • During the OnBeforeChange event
  • During the OnValidate event
  • During an undo or redo operation

Example

In the following example, the IsDOMReadOnly property of the XDocument object is used to determine whether data in the form's underlying XML document has been placed in a read-only state. If it has, a return statement is used to exit the event handler.

    function msoxd__item::OnAfterChange(objEvent)
{

   // Determine whether the XML DOM is read-only.
   if (XDocument.IsDOMReadOnly)
      return;

   // Continue normal processing...

}