officefileapi-devexpress-dot-xtrarichedit-dot-fieldoptions-7764723e.md
Gets or sets whether the DOCVARIABLE field value is cleared when it cannot be calculated.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
[DefaultValue(true)]
public bool ClearUnhandledDocVariableField { get; set; }
<DefaultValue(True)>
Public Property ClearUnhandledDocVariableField As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
True , to clear the value of the DOCVARIABLE field when it either cannot be retrieved from the Document.Variables dictionary or the CalculateDocumentVariable event is not handled; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to ClearUnhandledDocVariableField |
|---|---|
| RichEditControlOptionsBase |
.Fields .ClearUnhandledDocVariableField
|
When the Document.CalculateDocumentVariable event is not handled and a key-value pair for the DOCVARIABLE field is not found in the Document.Variables dictionary, the field value cannot be calculated. In this situation, it can be either left intact or cleared. Use the ClearUnhandledDocVariableField property to specify default action in this case.
See Also