BootstrapCardViewBuilderBase<T>.Bind(Object) Method

Binds the control to the specified data source.

Namespace: DevExpress.AspNetCore.Bootstrap

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll


public T Bind(
    object dataObject
Public Function Bind(
    dataObject As Object
) As T


Type Name Description
Object dataObject

An object representing the control's data source.


Type Description

A reference to this instance after the operation is completed.


Follow the steps below to display data within the Card View control.

  1. Get the data collection you want to display on Controller side. The sample below demonstrates the Northwind database's entity context.
  2. Define the CardView control in a View.
  3. Create a column for each data field whose data you want to display.
  4. Call the Bind method with the data source object as a parameter.

The following code demonstrates this approach:

@model IEnumerable

    .KeyFieldName(m => m.ProductID)
    .Columns(columns => {
        columns.Add(m => m.ProductName);
        columns.Add(m => m.UnitPrice);
        columns.Add(m => m.UnitsOnOrder);
            .UnboundExpression("UnitsOnOrder * UnitPrice")
            .PropertiesTextEdit(properties => properties
    .Routes(routes => routes
        .MapRoute(r => r

See also the Binding online demo.

See Also