Skip to main content
Tab

ASPxCardViewCardLayoutCreatedEventArgs.IsEditingCard Property

Gets whether the card is in edit mode.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web

Declaration

public bool IsEditingCard { get; }

Property Value

Type Description
Boolean

true if the card is in edit mode; otherwise, false.

Remarks

The following example illustrates how to use the FindLayoutItemByColumn(String) method to find layout items that belong to the specified columns and then change their visibility and column span.

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