Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

Add an Editor to a Detail View

  • 2 minutes to read

This lesson explains how to add an editor to a Detail View. In this example, we add an editor for the Department.Office property to the Contact Detail View.

Note

Before you proceed, take a moment to review the following lesson:

Step-by-Step Instructions

  1. In the MySolution.Module project, open the Model.DesignedDiffs.xafml file in the Model Editor.

  2. Navigate to the Views | MySolution.Module.BusinessObjects node. Expand the Contact_DetailView child node and click the Layout node.

  3. The Model Editor displays a design surface that imitates the Contact Detail View. Right-click the View’s empty space and choose Customize Layout.

    Start layout customization

  4. In the invoked Customization window, click the Add button.

    Customization Window

  5. In the Object Model dialog, expand the Department node, select the Office field, and click OK.

    Object Model Window

  6. The Office: item appears on the Hidden Items tab of the Customization window.

    A new field is added to the Object Model Window

  7. Drag the Office: item to the required position on the Contact Detail View.

    Add Layout Item Department.Office

  1. Run the WinForms or ASP.NET Web Forms application and invoke a Contact Detail View. The Office editor is located in the same column as the Department editor, Position editor, and other editors.

    Tutorial_UIC_Lesson15_3

You can see the changes made in this lesson in the Model Editor invoked for the Model.DesignedDiffs.xafml file located in the Main Demo | MainDemo.Module project. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 21.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET Web Forms version is available online at https://demos.devexpress.com/XAF/MainDemo.

Detailed Explanation

Layout Customization

In the customization mode that we activated in step 3 of this lesson, you can change the Detail View layout. See the following topic for more information: Customize the View Items Layout.

Users can also customize the Detail View layout. The following topic describes how to change the layout at runtime: Default Runtime Customization.

In addition, you can customize the Contact Detail View layout at runtime, and merge these changes into the MySolution.Module project. See the following topic for details: How to: Merge End-User Customizations into the XAF Solution.

Next Lesson:

Change Field Layout and Visibility in a List View