THEMES
THEME SETTINGS

Rich Text Editor - Mail Merge Fields

  • 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

In the DevExpress ASP.NET MVC Rich Text Editor (RichEdit extension), document fields are special placeholders for non-static data that might change (be updated on field update). These placeholders are replaced with actual data when the document is rendered for display or print. Using fields, you can automate different aspects of your document, such as auto page numbering, inserting actual dates and times, etc. The default Mail Merge ribbon tab can be used to work with fields (create, update, switch between field display modes).

A field is specified by a field code, and can be viewed within a document as either a field code or a field result. The field code specifies how the field result should be calculated when the field is updated. The field result represents the actual, resultant value of the field. This value is calculated by the RichEdit's field updating engine based on the field code information. To insert a field, position the mouse cursor within a document and execute the Create Field command from the ribbon's Mail Merge tab (or use the Ctrl + F9 shortcut). Field codes appear between curly brackets ( { } ). The following field codes are supported.

  • DATE - Inserts the current date and time.
  • TIME - Inserts the current time.
  • DOCVARIABLE - Enables you to programmatically insert complex content when this field is updated.
  • HYPERLINK - Enables you to navigate to another location or to a bookmark.
  • NUMPAGES - Inserts the total number of pages.
  • PAGE - Inserts the number of the page containing the field.
  • MERGEFIELD - Retrieves a value from the bound data source.

 In a document, a field code is displayed using the following syntax:

{ FIELDNAME Properties Optional_Switches }

FIELDNAME - This is the name of the field.
Properties - These are any instructions or variables that are used in a particular field. Not all fields have parameters, and in some fields, parameters are optional.
Optional switches - These are any optional settings that are available for a particular field. Not all fields have switches available, other than those that control the formatting of the field results.

You can switch between displaying the field code and the field result by right-clicking in a field (or in a selected document portion that contains fields) and clicking the context menu's Toggle Field Codes item (or using the Shift + F9 shortcut). To toggle all fields within a document, use the Show All Field Codes and Show All Field Results commands in the ribbon's Mail Merge tab (or use the Alt + F9 shortcut).

  To update fields, use the context menu's Update Field item (or press F9). All fields in a document can be updated using the Update All Fields command in the ribbon's Mail Merge tab.

Version: v2017 vol 1.3
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at info@devexpress.com or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.