Change Theme Settings
Change Theme Settings
Themes
 
Metropolis
Moderno
iOS
Material
Material Compact
Office 365
Mulberry
Show All Themes
v
...v

Document Variables

  • Undo

    Undo
    po
  • Clipboard

    Clipboard
    po
  • v
    v
    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:
    +
    -
    Footer from Bottom:
    +
    -
    Position

    Position
    po
  • Close

    Close
    po
  • v
    Shape Styles

    Shape Stylespo
  • dialogboxlauncherArrange

    Arrange
    po


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.