The requested page is not available for the requested platform. You are viewing the content for Default platform.

ComplexWebListEditor.FindPropertyEditor(String, ViewEditMode) Method

Provides access to the ComplexWebListEditor's Property Editor, representing a particular property.

Namespace: DevExpress.ExpressApp.Web.Editors

Assembly: DevExpress.ExpressApp.Web.v19.1.dll


public WebPropertyEditor FindPropertyEditor(
    string propertyName,
    ViewEditMode viewEditMode
Public Function FindPropertyEditor(
    propertyName As String,
    viewEditMode As ViewEditMode
) As WebPropertyEditor


Name Type Description
propertyName String

A string holding the name of the required property.

viewEditMode ViewEditMode

A ViewEditMode enumeration value that specify the display mode.


Type Description

A WebPropertyEditor representing the specified property.


To create inline templates used to display grid cells, the ComplexWebListEditor instantiates appropriate Property Editors, using the information from the Application Model. The FindPropertyEditor method allows you to customize the actual controls representing grid cells, by customizing these Property Editors. The following code snippet illustrates this. The MyViewController designed for Contact List Views, changes the display color of the LastName property to purple.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
using DevExpress.ExpressApp.Model;
using DevExpress.ExpressApp.Web.Editors;

public class MyViewController : ObjectViewController<ListView, Contact> {
    WebPropertyEditor lastNamePropertyEditor;
    protected override void OnActivated() {
        if (View.Editor is ComplexWebListEditor) {
            IModelMemberViewItem lastName = View.Model.Columns["LastName"];
            lastNamePropertyEditor = ((ComplexWebListEditor)View.Editor).FindPropertyEditor(lastName, ViewEditMode.View);
            lastNamePropertyEditor.ControlCreated += MyViewController_ControlCreated;
    void MyViewController_ControlCreated(object sender, EventArgs e) {
        ((WebPropertyEditor)sender).InplaceViewModeEditor.ForeColor = Color.Purple;
    protected override void OnDeactivated() {
        if (lastNamePropertyEditor != null) {
            lastNamePropertyEditor.ControlCreated -= MyViewController_ControlCreated;
            lastNamePropertyEditor = null;
See Also