Skip to main content

ASPxCardView.InitNewCard Event

Enables you to initialize added cards.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public event ASPxDataInitNewRowEventHandler InitNewCard

Event Data

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

Property Description
NewValues Gets a dictionary that contains the new field name/value pairs for the new row.


The InitNewCard event is raised when a new card is added to the ASPxCardView. This occurs when:

Use the event parameter’s NewValues property to specify the values in the new card. Note that you can initialize values only for those columns that are visible within the Edit Form. To specify values of hidden columns, handle the ASPxCardView.CardInserting event.


In this example, the ASPxCardView.InitNewCard event is handled to initialize the new record’s field values with default values.

The image below shows the result:


protected void ASPxCardView1_InitNewCard(object sender, DevExpress.Web.Data.ASPxDataInitNewRowEventArgs e)
    e.NewValues["CategoryName"] = "Seafood";
    e.NewValues["Description"] = "Seafood and fish";
See Also