Skip to main content

ASPxCardViewCardLayoutCreatedEventArgs.FindLayoutItemOrGroup(String) Method

Returns a layout item or group object with the specified name.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web


public LayoutItemBase FindLayoutItemOrGroup(
    string name


Name Type Description
name String

The layout item or group name.


Type Description

The layout item or group.


Pass the name of a layout item or group to the FindLayoutItemOrGroup(String) method to get and access this layout item.

In the following example, the FindLayoutItemOrGroup method gets a layout group whose name is “DismissalInformation” and makes it visible on the client if a user types a value in the “Dismissal Date” field.

<dx:ASPxCardView ID="cardView" runat="server" OnCardLayoutCreated="cardView_CardLayoutCreated" >
    // ...
    <EditFormLayoutProperties >
                    <dx:CardViewLayoutGroup ColumnCount="2" Caption="Employee Information">
                        // ...
                    <dx:CardViewLayoutGroup Caption="Dismissal Information" Name="DismissalInformation">
                            // ...
protected void cardView_CardLayoutCreated(object sender, DevExpress.Web.ASPxCardViewCardLayoutCreatedEventArgs e) {
    ASPxCardView cardView = sender as ASPxCardView;
    LayoutGroup layoutGroupDismissal = (LayoutGroup)e.FindLayoutItemOrGroup("DismissalInformation");

    if(layoutGroupDismissal == null) return;
    if(cardView.IsNewCardEditing) {
        layoutGroupDismissal.Visible = false;
    var fireDate = cardView.GetCardValues(e.CardVisibleIndex, "FireDate");
    layoutGroupDismissal.ClientVisible = fireDate != null && (DateTime)fireDate != DateTime.MinValue;
See Also