This demo illustrates how to specify style settings for DevExpress MVC ComboBox items using the ItemTextCellPrepared and ItemRowPrepared events.
To customize the appearance of the "Contact Name" and "Phone" columns in the editor, the ItemTextCellPrepared event is used. Cells in the "Contact Name" column are marked with the green color if the "Title" field value of a corresponding record in the data base is "Owner". These cells have a tooltip that displays the "Owner" text. In the "Phone" column, all phone numbers are italicized and marked with the red color.
The ItemRowPrepared event is used to specify rows with a custom tooltip that shows information from the "Country", "City", and "Address" fields.
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
The source code files for this demo are installed (by default) in the following directory:
Open CS Solution
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxDataEditorsDemos