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

ListEditor.ControlsCreated Event

Occurs after a ListEditor's control is created.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public event EventHandler ControlsCreated
Public Event ControlsCreated As EventHandler

Event Data

The ControlsCreated event handler receives an argument of the EventArgs type.

Remarks

Handle the ControlsCreated event to modify a List Editor's control after it is created in a List View. For example, the code below shows how to access GridView and change the FocusedCell.BackColor* property to orange when the GridListEditor is used to represent data. See the (xref:113189) topic for more details about available ListEditor classes.

public class ListEditorController : ViewController<ListView> {
    private GridListEditor listEditor = null;
    private void listEditor_ControlsCreated(object sender, EventArgs e) {
        ((GridListEditor)sender).GridView.Appearance.FocusedCell.BackColor = Color.Orange;
    }
    protected override void OnActivated() {
        base.OnActivated();
        listEditor = View.Editor as GridListEditor;
        if (listEditor != null) {
            listEditor.ControlsCreated += listEditor_ControlsCreated;
            }
    }
    protected override void OnDeactivated() {
        if (listEditor != null) {
            listEditor.ControlsCreated -= listEditor_ControlsCreated;
            }
        base.OnDeactivated();
    }
}



See Also