Back to Devexpress

How to: Add and Initialize a New Card

aspnet-114466-components-card-view-examples-how-to-add-and-initialize-a-new-card.md

latest619 B
Original Source

How to: Add and Initialize a New Card

  • Dec 17, 2020

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:

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