aspnetmvc-devexpress-dot-web-dot-mvc-dot-cardviewsettings-f924bcbb.md
Provides access to a CardView’s column collection.
Namespace : DevExpress.Web.Mvc
Assembly : DevExpress.Web.Mvc5.v25.2.dll
NuGet Package : DevExpress.Web.Mvc5
public MVCxCardViewColumnCollection Columns { get; }
Public ReadOnly Property Columns As MVCxCardViewColumnCollection
| Type | Description |
|---|---|
| MVCxCardViewColumnCollection |
An MVCxCardViewColumnCollection object that is a collection of columns.
|
The Columns property stores a collection of MVCxCardViewColumn objects that denote columns. It provides methods that allow you to add new and remove existing columns. Individual columns can be accessed using indexed notation.
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.AddEditModeCommandItem();
settings.CardLayoutProperties.Items.Add("ID");
settings.CardLayoutProperties.Items.Add("Test");
...
});
See Also