The requested page is not available for the requested platform. You are viewing the content for Default platform.

BootstrapCardViewBuilderBase<T>.Columns(Action<BootstrapCardViewColumnCollectionBuilder>) Method

Provides access to the Card View column collection.

Namespace: DevExpress.AspNetCore.Bootstrap

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

Declaration

public T Columns(
    Action<BootstrapCardViewColumnCollectionBuilder> config
)
Public Function Columns(
    config As Action(Of BootstrapCardViewColumnCollectionBuilder)
) As T

Parameters

Name Type Description
config Action<BootstrapCardViewColumnCollectionBuilder>

An Action that configures the BootstrapCardViewColumnCollectionBuilder's functionality.

Returns

Type Description
T

A reference to this instance after the operation is completed.

Remarks

Important

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

The Card View control stores its data columns in the Columns collection. Each column corresponds to a Card View item.

Use the Add method to add a column to a Card View's column collection.

@using EditableTask = DevExpress.AspNetCore.DemoModels.Task
@model IEnumerable<EditableTask>
@(Html.DevExpress()
    .BootstrapCardView<EditableTask>("cardViewWithDataColumn")
    .Columns(columns => {
        columns.Add(m => m.Name);
        columns.Add(m => m.StartDate);
        columns.Add(m => m.EndDate);
        columns.Add(m => m.Done);
    })
    .Routes(routes => routes
        .MapRoute(r => r
            .Controller("CardView")
            .Action("CardViewPartial")))
    .Bind(Model))

For more information on available Card View column types, refer to the Column Types online demo.

See Also