Skip to main content
A newer version of this page is available. .
Tab

ASPxCardViewCardLayoutCreatedEventArgs.FindLayoutItemByColumn(String) Method

Returns a layout item that belongs to the specified column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

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