Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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