CardViewSettings.Columns Property
Provides access to a CardView’s column collection.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Property Value
Type | Description |
---|---|
MVCxCardViewColumnCollection | An MVCxCardViewColumnCollection object that is a collection of columns. |
Remarks
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