Skip to main content
Tab

LayoutItem.Controls Property

Provides access to the ASPxFormLayout item’s collection of nested controls.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public ControlCollection Controls { get; }

Property Value

Type Description
ControlCollection

Object that represents a collection of nested controls.

Remarks

This example demonstrates how to find a layout item by its name and assign a value to a nested control:

View Example: Form Layout for ASP.NET Web Forms - How to find an item and access nested controls

Use the LayoutItem.Controls property to access a control placed in a layout item. The code sample below traverses through the collection of nested controls and assigns new values to the controls.

var layoutItem = (baseItem as LayoutItem);
foreach (var control in layoutItem.Controls) {
    ASPxEdit editor = control as ASPxEdit;
    if (editor != null)
        editor.Value = DateTime.Now;
}
See Also