Skip to main content

BootstrapCardView.CardLayoutItemsCreated Event

Occurs when the card layout has been created.

Namespace: DevExpress.Web.Bootstrap

Assembly: DevExpress.Web.Bootstrap.v24.1.dll

NuGet Package: DevExpress.Web.Bootstrap

Declaration

public event BootstrapCardViewCardLayoutItemsCreatedEventHandler CardLayoutItemsCreated

Event Data

The CardLayoutItemsCreated event's data class is BootstrapCardViewCardLayoutItemsCreatedEventArgs. The following properties provide information specific to this event:

Property Description
IsEditingCard Gets whether the card is in edit mode. Inherited from ASPxCardViewCardLayoutCreatedEventArgs.
Properties Contains settings related to the Form Layout used in the processed card.
VisibleIndex Gets the visible index of the processed card. Inherited from ASPxCardViewCardLayoutCreatedEventArgs.

The event data class exposes the following methods:

Method Description
FindLayoutItemByColumn(String) Returns a layout item that belongs to the specified column. Inherited from ASPxCardViewCardLayoutCreatedEventArgs.
FindLayoutItemOrGroup(String) Returns a layout item or group object with the specified name. Inherited from ASPxCardViewCardLayoutCreatedEventArgs.

Remarks

The CardLayoutItemsCreated event is raised for each data card in the Card View when the corresponding card layout has been created. You can handle this event to change card settings.

protected void CardView_CardLayoutItemsCreated(object sender, 
  DevExpress.Web.Bootstrap.BootstrapCardViewCardLayoutItemsCreatedEventArgs e) {
        // Process the first card only
        if (e.VisibleIndex == 0) {
            // Change the caption of the first layout item
            e.Properties.Items[0].Caption = "New Caption";
            // Set the new ColCount for the processed card
            e.Properties.ColCount = 3;
        }
See Also