Skip to main content
.NET Framework 4.5.2+

ListView.EditViewCreated Event

Occurs after the ListView.EditView has been created.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v23.1.dll

NuGet Package: DevExpress.ExpressApp


public event EventHandler<DetailViewCreatedEventArgs> EditViewCreated

Event Data

The EditViewCreated event's data class is DetailViewCreatedEventArgs. The following properties provide information specific to this event:

Property Description
View Specifies the Detail View to be customized in the XafApplication.DetailViewCreated event.


Handle this event to access the Detail View displayed together with a List View.

The following example demonstrates how to make the Department Detail View in MasterDetailMode read-only:

using System;
using DevExpress.ExpressApp;
// ...
public class AllowNewViewController : ViewController<ListView> {
    protected override void OnActivated() {
        if(View.Model.MasterDetailMode == MasterDetailMode.ListViewAndDetailView) {
            if(View.EditView != null) {
            View.EditViewCreated += new EventHandler<DetailViewCreatedEventArgs>(AllowNewViewController_EditViewCreated);
    private void AllowNewViewController_EditViewCreated(object sender, DetailViewCreatedEventArgs e) {
    private void SetAllowEdit(DetailView editView) {
        editView.AllowEdit.SetItemValue("ByObjectType", View.ObjectTypeInfo.Type != typeof(Department));
    protected override void OnDeactivated() {
        View.EditViewCreated -= AllowNewViewController_EditViewCreated;
See Also