Back to Devexpress

MVCxCardViewColumnLayoutItem Class

aspnetmvc-devexpress-dot-web-dot-mvc-2d31a29f.md

latest3.4 KB
Original Source

MVCxCardViewColumnLayoutItem Class

Represents a layout item (with MVC specificity) within the CardView’s edit form.

Namespace : DevExpress.Web.Mvc

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

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public class MVCxCardViewColumnLayoutItem :
    CardViewColumnLayoutItem,
    IFormLayoutHtmlHelperOwner
vb
Public Class MVCxCardViewColumnLayoutItem
    Inherits CardViewColumnLayoutItem
    Implements IFormLayoutHtmlHelperOwner

The following members return MVCxCardViewColumnLayoutItem objects:

Remarks

Example

MVC:

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

    settings.CardLayoutCreated = (s, e) =>
    {
        var cv = (MVCxCardView)s;
        if (Convert.ToInt32(cv.GetCardValues(e.VisibleIndex, "ID")) == 2)
        {
            e.Properties.ForEach((item) =>
            {
                var cardLayoutItem = item as MVCxCardViewColumnLayoutItem;
                if (cardLayoutItem != null)
                    if (cardLayoutItem.ColumnName == "Test")
                        cardLayoutItem.Visible = false;
            });
        }
    };
});

Implements

IStateManager

DevExpress.Web.Internal.IPropertiesDirtyTracker

DevExpress.Web.Internal.IWebControlObject

IPropertiesOwner

IExpressionsAccessor

DevExpress.Web.Design.IDesignTimeCollectionItem

DevExpress.Web.Design.IDesignTimePropertiesOwner

IDataSourceViewSchemaAccessor

Inheritance

Object StateManager CollectionItem LayoutItemBase LayoutItem ContentPlaceholderLayoutItem ColumnLayoutItem CardViewColumnLayoutItem MVCxCardViewColumnLayoutItem

See Also

MVCxCardViewColumnLayoutItem Members

Card View

DevExpress.Web.Mvc Namespace