Skip to main content
All docs
V23.2

DataGridExportBuilder.Formats(IEnumerable<DataGridExportFormat>) Method

Specifies the availability and captions of data export buttons. Mirrors the client-side formats option.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public DataGridExportBuilder Formats(
    IEnumerable<DataGridExportFormat> value
)

Parameters

Name Type Description
value IEnumerable<DataGridExportFormat>

The option value.

Returns

Type Description
DataGridExportBuilder

A reference to this instance after the method is called.

Remarks

Use the following notation to set the option’s value:

@(Html.DevExtreme().DataGrid()
    .Export(export => export
        .Formats(new[] { DataGridExportFormat.Pdf })
    )
)
See Also