ListEditor.ControlsCreated Event
Occurs after a ListEditor‘s control is created.
Namespace: DevExpress.ExpressApp.Editors
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
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();
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ControlsCreated event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.