DevExpress MVC extensions support standard the ASP.NET MVC templating system. This demo illustrates how to use DevExpress MVC Data Editors for building custom editor templates.
The Html.EditorFor() method is used to display data editors for model data fields using the required template. This method consults the UIHint attribute value or data type to determine which template to render for the given property.
All the custom editor template files are located in the EditorTemplates subfolder in the ~\Views\Shared project folder. Each template file has the same name as a corresponding data type or UIHint attribute value. The template view code in this demo contains the label that displays the property name and the data editor that allows you to edit the required field.
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).
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxDataEditorsDemos |