CardViewSettings.CardLayoutProperties Property

Provides access to the settings allowing you to customize a card layout.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll

Declaration

public MVCxCardViewFormLayoutProperties CardLayoutProperties { get; }
Public ReadOnly Property CardLayoutProperties As MVCxCardViewFormLayoutProperties

Property Value

Type Description
MVCxCardViewFormLayoutProperties

An MVCxCardViewFormLayoutProperties object that contains the card layout settings.

Remarks

var cardView = Html.DevExpress().CardView(settings =>
{
    settings.Name = "CardView";
    settings.CallbackRouteValues = new { Controller = "Home", Action = "CardViewPartial" };
    settings.KeyFieldName = "ID";

    settings.Columns.Add("ID");
    settings.Columns.Add("Test");

    settings.CardLayoutProperties.Items.AddCommandItem(i =>
    {
        i.ShowNewButton = true;
        i.ShowEditButton = true;
        i.ShowDeleteButton = true;
    });

    settings.CardLayoutProperties.Items.AddEditModeCommandItem();
    settings.CardLayoutProperties.Items.Add("ID");
    settings.CardLayoutProperties.Items.Add("Test");
    ...
});
See Also