All docs
V20.2
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Core 3.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

DetailViewExtensions.CustomizeViewItemControl(DetailView, Controller, Action<ViewItem>, String[]) Method

Allows you to access and customize controls of specified View Items.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v20.2.dll

Declaration

public static void CustomizeViewItemControl(
    this DetailView view,
    Controller controller,
    Action<ViewItem> customizeAction,
    params string[] viewItemsId
)
<ExtensionAttribute>
Public Shared Sub CustomizeViewItemControl(
    view As DetailView,
    controller As Controller,
    customizeAction As Action(Of ViewItem),
    ParamArray viewItemsId As String()
)

Parameters

Name Type Description
view DetailView

A DetailView that contains the specified View Items.

controller Controller

A Controller to customize controls of the specified View Items.

customizeAction Action<ViewItem>

A method to customize controls of the specified View Items.

viewItemsId String[]

Identifiers of View Items.

Remarks

The following code shows how to use this method to customize controls of the ActualWorkHours and EstimatedWorkHours View Items.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
using DevExpress.XtraEditors;
// ...
public class SetMinValueController : ObjectViewController<DetailView, DemoTask> {
    protected override void OnActivated() {
        base.OnActivated();
        View.CustomizeViewItemControl(this, SetMinValue, "ActualWorkHours", "EstimatedWorkHours");
    }
    private void SetMinValue(ViewItem viewItem) {
        SpinEdit spinEdit = (SpinEdit)viewItem.Control;
        spinEdit.Properties.MinValue = 0;
    }
}

You can find the View Item's identifier in the Model Editor.

See Also