Skip to main content

Document.CalculateDocumentVariable Event

Fires when the DOCVARIABLE field is updated.

Namespace: DevExpress.XtraRichEdit.API.Native

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

#Declaration

event CalculateDocumentVariableEventHandler CalculateDocumentVariable

#Event Data

The CalculateDocumentVariable event's handler receives an argument of the CalculateDocumentVariableEventArgs type. The following properties provide information specific to this event:

Property Description
Arguments Provides access to a collection of arguments within the DOCVARIABLE field.
Handled Gets or sets whether the default action is required.
KeepLastParagraph Gets or sets whether the last paragraph of the inserted document is kept in the resulting document.
Value Gets or sets the value of the DOCVARIABLE field that fired the event.
VariableName Gets the name of the document variable to which the DOCVARIABLE field refers.

#Remarks

The CalculateDocumentVariable event is fired when the DOCVARIABLE value is calculated.

You can handle this event to analyze DOCVARIABLE field switches and arguments, and provide custom content to insert into this field. The content can be of any supported type, and even as complex as another mail merged document. See our Master-Detail demo module, for an example.

See Also