Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Collapse]Rich Text Editor
   [Expand]Getting Started
     Supported Document Formats
     Layout API
     Product Class Structure
     Default Keyboard Shortcuts
     Measure Units
     HTML Tag Interpretation
   [Expand]Visual Elements
   [Expand]Member Tables
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation


This document is an overview of the most useful events implemented for the RichEditControl.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T258534.

When a new document is created in RichEditControl via the RichEditControl.CreateNewDocument method or a CreateEmptyDocumentCommand command, the RichEditControl.EmptyDocumentCreated event is raised.

When a document is loaded in RichEditControl, the RichEditControl.DocumentClosing event occurs. It enables you to take the necessary steps before the content of the previously loaded document is discarded. Then, the RichEditControl.BeforeImport event is raised, enabling you to configure the importer; and the RichEditControl.DocumentLoaded event indicates that the loading process is finalized.

The RichEditControl.ContentChanged event indicates changes in the control content, while the RichEditControl.ModifiedChanged event signalizes that the current document is modified and the RichEditControl.Modified property is changed. The ModifiedChanged event does not occur when a document is loaded or saved.


If the loaded document contains fields and the RichEditMailMergeOptions.ViewMergedData is set to true, the fields are automatically updated and the ModifiedChanged event fires.

When a document is saved, the RichEditControl.BeforeExport event occurs, enabling you to customize export settings, e.g. specify the location to store external content when the document is saved in HTML.

A special RichEditControl.UnhandledException event provides an easy-to-use method for processing exceptions, which are not handled by RichEditControl.

Some events are implemented to allow the customization of RichEditControl. The RichEditControl.PopupMenuShowing event allows you to modify a popup menu before it is shown. Numerous *FormShowing events (such as RichEditControl.FontFormShowing, RichEditControl.SearchFormShowing, RichEditControl.HyperlinkFormShowing etc.) enable you to add custom logic or validation to corresponding dialogs. Note that you can create descendants for almost all dialogs and override their methods as required.

User activity can be tracked by such events as RichEditControl.SelectionChanged, RichEditControl.HyperlinkClick, RichEditControl.StartHeaderFooterEditing, RichEditControl.ZoomChanged.

The mail merge process is also accompanied with events - RichEditControl.MailMergeStarted, RichEditControl.MailMergeRecordStarted, RichEditControl.MailMergeRecordFinished, RichEditControl.MailMergeFinished.

Special purpose events are the RichEditControl.AutoCorrect and the RichEditControl.CalculateDocumentVariable.

Expanded See Also

How would you rate this topic?​​​​​​​