This example illustrates how to bind the RichEditControl to a data column and load and save Rtf content (note that actual data is stored in the SQL Server database). The RichEditControl.RtfText property is used to bind the RichEditControl to the column.
The client application supports two data persistence levels: control (RichEditControl) level and memory (DateSet) level. The Undo Manager of the RichEditControl controls the first level. We utilize the RichEditControl.Modified property to define the current state of this level. The DataNavigator allows users to accept and reject changes, and switch between entries. The ADO.NET DataTable container maintains the memory level. The changes at this level are accepted/rejected by the user via separate buttons above the RichEditControl. You can find more information on this subject in the following article: Row States and Row Versions.
To test this example locally, you should setup "CarsDB" sample database in your SQL Server instance. Create a database with this name and utilize Script.sql file, attached with this example, to generate a sample table schema and data.
The picture below illustrates the sample in action.
- Form1.cs (VB: Form1.vb)
- Program.cs (VB: Program.vb)
- Script.sql
(you will be redirected to DevExpress.com to submit your response)