Skip to main content

FieldOptions.ClearUnhandledDocVariableField Property

Gets or sets whether the DOCVARIABLE field value is cleared when it cannot be calculated.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

[DefaultValue(true)]
public bool ClearUnhandledDocVariableField { get; set; }

Property Value

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.

Property Paths

You can access this nested property as listed below:

Object Type Path to ClearUnhandledDocVariableField
RichEditControlOptionsBase
.Fields .ClearUnhandledDocVariableField

Remarks

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