MVCxCardViewColumn.ColumnType Property

Gets or sets the column data editor type.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v21.1.dll

Declaration

public MVCxCardViewColumnType ColumnType { get; set; }

Property Value

Type Description
MVCxCardViewColumnType

One of the MVCxCardViewColumnType enumeration values.

Available values:

Show 16 items
Name Description
Default

Indicates that a default editor (TextBox) is used to edit column values.

TextBox

Indicates that a text box is used to edit column values.

ButtonEdit

Indicates that a button editor is used to edit column values.

CheckBox

Indicates that a check box is used to edit and display column values.

ComboBox

Indicates that a combo box is used to edit column values.

DateEdit

Indicates that a date editor is used to edit column values.

SpinEdit

Indicates that a spin editor is used to edit column values.

TimeEdit

Indicates that a time editor is used to edit column values.

ColorEdit

Indicates that a color editor is used to edit column values.

DropDownEdit

Indicates that a drop down editor is used to edit column values.

Memo

Indicates that a memo editor is used to edit column values.

BinaryImage

Indicates that a binary image editor is used to display column values.

Image

Indicates that an image editor is used to display column values.

Indicates that a hyperlink editor is used to display column values.

ProgressBar

Indicates that a progress bar is used to visualize column values.

TokenBox

Indicates that a token box is used to edit column values.

Remarks

Use the ColumnType property to specify the CardView column’s data type. By default, the ColumnType property is set to Default. In this instance, a text box is used to edit column values.

Example

NOTE

For a full example, see the CardView - Sorting (MVC) demo.

@Html.DevExpress().CardView( settings => {
    settings.Name = "CardView";
    ...
    settings.Columns.Add(c =>{
        c.FieldName = "Price";
        c.SortOrder = ColumnSortOrder.Ascending;
        c.PropertiesEdit.DisplayFormatString = "c";
    });
    settings.Columns.Add(c => {
        c.FieldName = "PhotoUrl";
        c.ColumnType = MVCxCardViewColumnType.Image;
        ((ImageEditProperties)c.PropertiesEdit).ImageWidth = 250;
    });

    ...
}).Bind(Model).GetHtml()
See Also