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

CardView Class

Represents a View that displays data using cards.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v18.2.dll

Declaration

public class CardView :
    GridViewBase
Public Class CardView
    Inherits GridViewBase

Remarks

A Card View represents data in cards. Data records are represented as cards, and data fields are represented as card fields, displayed one under another.

Once you have created a new instance of the CardView class, it should be assigned to the grid's GridControl.View property.

CardView_Overview

To learn more about specific features provided by the Card View, see Views and Card View. For information on how to create views, see Creating and Assigning Views.

Examples

This example shows how to create the DXGrid control and display data from the NorthWind database. In this example, data records are represented by cards in a Card View.

The CreateGrid() method shows how to create and initialize the DXGrid control at runtime.

using DevExpress.Xpf.Grid;

public Window1() {
    InitializeComponent();
    gc.DataSource =
        new dsNwindProductsTableAdapters.ProductsTableAdapter().GetData();
    //CreateGrid();
}
private void CreateGrid() {
    GridControl gc = new GridControl();
    gc.AutoPopulateColumns = true;
    gc.View = new CardView();
    gc.DataSource =
        new dsNwindProductsTableAdapters.ProductsTableAdapter().GetData();
    this.AddChild(gc);
}

Implements

See Also