Tab
A newer version of this page is available. Switch to the current version.

ASPxCardViewCardLayoutCreatedEventArgs Class

Provides data for the ASPxCardView.CardLayoutCreated event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class ASPxCardViewCardLayoutCreatedEventArgs :
    EventArgs
Public Class ASPxCardViewCardLayoutCreatedEventArgs
    Inherits EventArgs

Remarks

Example

MVC:

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;
            });
        }
    };
});

Inheritance

Object
EventArgs
ASPxCardViewCardLayoutCreatedEventArgs
See Also