Fields

  • 2 min to read

In the DevExpress ASP.NET Rich Text Editor, document fields serve as placeholders in a document, which are replaced with actual data from the data source when the document is displayed or printed.

RichEdit-MailMerge-RibbonTab

To simplify many common tasks when working with fields, the RichEdit UI provides the following commands and shortcuts. You also can accomplish these tasks using the corresponding client commands

Task

UI Command / Shortcut Key

Client command

Insert a field

Click the Create Field button in the ribbon's Mail Merge tab.

Or press CTRL+F9.

RichEditCommands.createField

Show all field codes

Click the Show All Field Codes button in the Mail Merge ribbon tab.

RichEditCommands.showAllFieldCodes

Show all field results

Click the Show All Field Results button in the Mail Merge ribbon tab.

-

Toggle between field codes and field results for selected fields

Select a range containing fields and press SHIFT+F9 or click the Toggle Field Codes item in the context menu.

RichEditCommands.showFieldCodes - to show the selected fields' codes.

Toggle between field codes and field results for all fields of the active sub-document

Press ALT+F9.

-

Update selected field values

Select a range containing fields and press F9 or click the Update Field item in the context menu.

RichEditCommands.updateField

Update all field values of all sub-documents

Click the Update All Fields button in the Mail Merge ribbon tab.

RichEditCommands.updateAllFields

Insert a date field

Click the Create Field and select DATE in the Mail Merge ribbon tab Press ALT+SHIFT+D.

RichEditCommands.createDateField

Insert a time field

Click the Create Field and select TIME in the Mail Merge ribbon tab or press ALT+SHIFT+T.

RichEditCommands.createTimeField

Insert a page number field

Click the Page Number button in the Insert ribbon tab or press ALT+SHIFT+P

RichEditCommands.createPageField

Insert a page count field

Click the Page Count button in the Insert ribbon tab.

RichEditCommands.createPageCountField

Insert a table of contents field

Click the Table of Contents button in the References ribbon tab.

RichEditCommands.insertTableOfContents

See the Field Codes topic for the supported field codes and their structure.

See Also