Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Collapse]HTML Editor
    Deployment of ASPxHtmlEditor
    Main Features
    Getting Started
    ASPxHtmlEditor Designer
   [Expand]Concepts
   [Expand]Visual Elements
   [Collapse]Examples
     How to: Set up a custom font dialog
     How to: Implement custom commands and dialogs
     How to: Provide an end-user with a list of templates to insert into the editor
     How to: Create custom toolbar items
     How to: Implement a custom Preview popup
     How to: Use the ASPxHtmlEditor to edit the XtraReport content directly on the web page
     How to: Use the ASPxHtmlEditor in the ASPxGridView
     How to: Bind the HTML Property to a Database Field
     How to: Use the client PerformDataCallback method and the server CustomDataCallback event
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Use the ASPxHtmlEditor in the ASPxGridView

Show Me

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

This example illustrates how to use the ASPxHtmlEditor control in the ASPxGridView EditForm for editing text column data.

The ASPxHtmlEditor is defined within the ASPxGridView EditFormTemplate and bound with the "DescriptionHtml" column via the binding expression (the "Eval" method).

When using the "Eval" expression, it is necessary to capture the modified value/property and post it back to a datasource manually. See the Default.aspx.cs/Default.aspx.vb code behind source.

If you need to achieve the automatic Two-Way data binding functionality, use the "Bind" method instead of the "Eval" one.

In this case, the server-side code for retrieving the editor value (the ASPxHtmlEditor.Html property) and putting it into the e.NewValues dictionary is no longer required (except of cases described in the K18564: How to resolve issues with binding expressions #1 KB Article).

In addition, take a look at the online Two-Way Binding demo. It illustrates how to use different kinds of editors in a similar scenario.

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