ListEditor.ControlsCreated Event
Occurs after a ListEditor‘s control is created.
Namespace: DevExpress.ExpressApp.Editors
Assembly: DevExpress.ExpressApp.v18.1.dll
Declaration
Event Data
The ControlsCreated event's data class is EventArgs.
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