Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Document Variables

  • Undo

    Undo
    po
  • Clipboard

    Clipboard
    po
  • xv
    xv
    popopo
    dialogboxlauncherFont

    Font
    po
  • popo
    dialogboxlauncherParagraph

    Paragraph
    po
  • up
    down
    gpo

    Quick Styles
    Styles

    Styles
    po
  • Editing

    Editing
    po
  • Table Style Options

    Table Style Optionspo
  • up
    down
    gpo

    Quick Styles
    Table Styles

    Table Stylespo
  • v
    v
    dialogboxlauncherBorders & Shadings

    Borders & Shadingspo
  • Navigation

    Navigation
    po
  • Options

    Options
    po
  • Header from Top:
    x
    +
    -
    Footer from Bottom:
    x
    +
    -
    Position

    Position
    po
  • Close

    Close
    po
  • v
    Shape Styles

    Shape Stylespo
  • dialogboxlauncherArrange

    Arrange
    po
x


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.

Collapse/Expand
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).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxRichEditDemos