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

BuilderFactoryExtensions.BootstrapGridView(BuilderFactory) Method

Creates a Grid View control.

Namespace: DevExpress.AspNetCore

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

Declaration

public static BootstrapGridViewBuilder BootstrapGridView(
    this BuilderFactory builderFactory
)
<ExtensionAttribute>
Public Shared Function BootstrapGridView(
    builderFactory As BuilderFactory
) As BootstrapGridViewBuilder

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to Grid View settings.

Returns

Type Description
BootstrapGridViewBuilder

A builder for a Grid View control.

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 code sample below demonstrates how you can use this method to create a Grid View control.

@model IEnumerable
@(Html.DevExpress()
    .BootstrapGridView<SalesProduct>()
    .KeyFieldName(m => m.ProductID)
    .Columns(columns => {
        columns.Add(m => m.ProductName);
        columns.Add(m => m.QuantityPerUnit);
        columns.Add()
            .FieldName("UnitPrice");
        columns.Add()
            .FieldName("UnitsOnOrder");
        columns.AddTextColumn()
            .FieldName("Total")
            .UnboundType(UnboundColumnType.Decimal)
            .UnboundExpression("UnitsOnOrder * UnitPrice")
            .PropertiesTextEdit(properties => properties
                .DisplayFormatString("c"));
    })
    .Routes(routes => routes
        .MapRoute(r => r
            .Action("Binding")
            .Controller("GridView")))
    .Bind(Model))
See Also