The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

DetailView.ViewEditMode Property

Specifies a mode of displaying a Detail View in ASP.NET and Mobile applications.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public ViewEditMode ViewEditMode { get; set; }
Public Property ViewEditMode As ViewEditMode
public ViewEditMode ViewEditMode { get; set; }
Public Property ViewEditMode As ViewEditMode
public ViewEditMode ViewEditMode { get; set; }
Public Property ViewEditMode As ViewEditMode

Property Value

Type Description
ViewEditMode

A ViewEditMode enumeration value that represents the current Detail View's display mode.

Property Value

Type Description
ViewEditMode

A ViewEditMode enumeration value that represents the current Detail View's display mode.

Property Value

Type Description
ViewEditMode

A ViewEditMode enumeration value that represents the current Detail View's display mode.

Remarks

Use this property to specify the mode for displaying the current Detail View in ASP.NET and Mobile applications. The following values are available:

  • Edit

    The Detail View is available for editing.

  • View

    The Detail View can be viewed only.

By default, a Detail View is displayed in the View mode when being invoked from a List View. To switch to the Edit mode, use the SwitchToEditMode Action. To save changes and switch the Detail View back to the View mode, use the SaveAndClose Action.

You can change this default behavior as described in the How to: Display a Detail View Directly in Edit Mode in ASP.NET and Mobile Applications topic.

The example below demonstrates how to make all Detail Views in an application read-only.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
// ...
public class MakeDetailViewsReadOnlyController : ViewController<DetailView> {
    protected override void OnActivated() {
        base.OnActivated();
        View.ViewEditMode = ViewEditMode.View;
    }
}
See Also