Back to Devexpress

CardViewSettings.CardLayoutProperties Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-cardviewsettings-73b811b7.md

latest2.0 KB
Original Source

CardViewSettings.CardLayoutProperties Property

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

Namespace : DevExpress.Web.Mvc

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

NuGet Package : DevExpress.Web.Mvc5

Declaration

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

Property Value

TypeDescription
MVCxCardViewFormLayoutProperties

An MVCxCardViewFormLayoutProperties object that contains the card layout settings.

|

Remarks

csharp
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

CardViewSettings Class

CardViewSettings Members

DevExpress.Web.Mvc Namespace