Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to use ASPxRichEdit to edit RTF data in ASPxGridView's EditForm

$
0
0
This example is based on the How to use ASPxHtmlEditor to edit RTF data one. It illustrates how to accomplish the same task using a new ASPxRichEdit control instead of the ASPxHtmlEditor one:
- Add ASPxRichEdit into the related column's EditItemTemplate;
- Handle the ASPxRichEdit.Init event.
- When editing an existing row, use the corresponding ASPxRichEdit.Open method overload;
    - Pass the documentId value to identify the document to open (for example, generated based on the editing row key/guid);
    - Return a stream or an array of bytes value from the 3-rd parameter created from the underlying column value;
- Handle the ASPxGridView RowInserting/RowUpdating events:
    - Retrieve the modified rich text content from ASPxRichEdit via the ASPxRichEdit.SaveCopy method;
    - Save it back to the database in the required format (a string or an array of bytes value).

Note that data modifications are not allowed in online demos. To allow editing in local/offline mode, download the example and comment out the "throw..." operation in the ASPxGridView.RowUpdating event handler.

See Also:
How to use ASPxHtmlEditor to edit RTF data

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>