The DevExpress ASP.NET MVC Rich Editor (RichEdit extension) enables you to store custom information in the document using document variables. To insert a document variable in the document, use the DOCVARIABLE field code.
The DOCVARIABLE field code has the following syntax:
{ DOCVARIABLE "variable name" "argument1" "argument 2"... }
This field code inserts the value of a named document variable specified by a text in the field argument(s). Before a field is updated, a delegate method specified by the settings.CalculateDocumentVariable property is called allowing you to manually calculate the required value. In the method implementation, the method argument's Arguments property provides access to a collection of arguments contained within the field. A common task is to evaluate DOCVARIABLE fields in a document depending on the variable name and argument and then substitute fields with their values. Note that you can return a text or the entire Document as a document variable.
This demo illustrates how to use the DOCVARIABLE field with custom parameters to dynamically calculate and insert total incomes by categories and to embed bar charts that visualize income allocation by products.
Local Copy of this Demo To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer. |
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxRichEditDemos |