Skip to main content
Tab

ASPxGridViewEditFormLayoutEventArgs.FindLayoutItemByColumn(String) Method

Returns a layout item that belongs to the specified column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public LayoutItem FindLayoutItemByColumn(
    string name_fieldName_caption
)

Parameters

Name Type Description
name_fieldName_caption String

The column’s name, caption or field name.

Returns

Type Description
LayoutItem

The layout item.

Remarks

The following example illustrates how to use the FindLayoutItemByColumn method. Here, this method returns layout items that belong to the specified columns and changes their visibility and column span.

protected void ASPxGridView1_EditFormLayoutCreated(object sender, ASPxGridViewEditFormLayoutEventArgs e) {
    ASPxGridView gridView = sender as ASPxGridView;

    LayoutItem itemOrderID = e.FindLayoutItemByColumn(gridView.KeyFieldName);
    itemOrderID.ClientVisible = false;

    LayoutItem itemProductName = e.FindLayoutItemByColumn("ProductName");
    itemProductName.ColumnSpan = 2;
    }
}
See Also