All docs
V21.1
21.1
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.
Tab

ASPxCardViewCardLayoutCreatedEventArgs.FindLayoutItemByColumn(String) Method

Returns a layout item that belongs to the specified column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

public LayoutItem FindLayoutItemByColumn(
    string name_fieldName_caption
)

Parameters

Name Type Description
name_fieldName_caption String

The field name.

Returns

Type Description
LayoutItem

The layout item.

Remarks

Pass a column’s field name or a caption to the FindLayoutItemByColumn(String) method to get a layout item that belongs to the specified column.

The following example illustrates how to use the FindLayoutItemByColumn method.

protected void ASPxCardView1_CardLayoutCreated(object sender, ASPxCardViewCardLayoutCreatedEventArgs e) {
    // Applies the card layout to the Edit Form only
    if(e.IsEditingCard) {
        ASPxCardView cardView = sender as ASPxCardView;
        if(cardView.IsNewCardEditing) {
            LayoutItem itemOrderID = e.FindLayoutItemByColumn(cardView.KeyFieldName);
            itemOrderID.ClientVisible = false;
            LayoutItem itemProductName = e.FindLayoutItemByColumn("ProductName");
            itemProductName.ColumnSpan = 2;
        }
    }
}
See Also