BootstrapCardViewBuilderBase<T>.KeyFieldName(String[]) Method

Sets the names of the data source key fields.

Namespace: DevExpress.AspNetCore.Bootstrap

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

Declaration

public T KeyFieldName(
    params string[] keyFieldNames
)
Public Function KeyFieldName(
    ParamArray keyFieldNames As String()
) As T

Parameters

Type Name Description
String[] keyFieldNames

A string array that specifies the key field names.

Returns

Type Description
TT

A reference to this instance after the operation is completed.

Remarks

Some operations (e.g., editing and grouping) require a key field to be specified. Use the KeyFieldName method for this purpose.

@model IEnumerable<Email>

@(Html.DevExpress()
    .BootstrapCardView("cardView")
    .KeyFieldName("OrderID", "ProductID")
    .Columns(columns => {
        columns.Add("From");
    })
    .Routes(routes => routes
        .MapRoute(r => r.Action("Binding").Controller("CardView")))
    .Bind(Model)
See Also