Skip to main content
All docs
V24.2

ExportFormatItem Class

A toolbar item in the ExportTo drop down list.

Namespace: DevExpress.Blazor.Reporting.Models

Assembly: DevExpress.Blazor.v24.2.Viewer.dll

NuGet Package: DevExpress.Blazor.Viewer

Declaration

public class ExportFormatItem :
    ToolbarItem

Remarks

The following code removes all items from the ExportTo drop down list, and adds a toolbar item for PDF export:

// ...
<DxReportViewer @ref="reportViewer"></DxReportViewer>

@code {
    DxReportViewer reportViewer;

        protected override void OnAfterRender(bool firstRender)
        {
            base.OnAfterRender(firstRender);
            reportViewer.ExportModel.AvailableFormats.Clear();
            ExportFormatItem pdfExportFormatItem = new ExportFormatItem(reportViewer)
            {
                Name = "PDF",
                Format = DevExpress.XtraPrinting.ExportFormat.Pdf
            };
            reportViewer.ExportModel.AvailableFormats.Add(pdfExportFormatItem);
        }
}

Implements

Inheritance

Object
ToolbarItem
ExportFormatItem
See Also