Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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:

Razor
// ...
<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