Skip to main content
All docs
V25.2
  • ExportFormatItem Class

    A toolbar item in the ExportTo drop down list.

    Namespace: DevExpress.Blazor.Reporting.Models

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

    NuGet Package: DevExpress.Blazor.Viewer

    Declaration

    public class ExportFormatItem :
        ToolbarItem

    Remarks

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

    // ...
    <DxReportViewer @ref="reportViewer"></DxReportViewer>
    
    @code {
        DxReportViewer reportViewer;
    
        protected override void OnAfterRender(bool firstRender)
        {
            if (firstRender) {
                reportViewer.ExportModel.AvailableFormats.Clear();
                ExportFormatItem pdfExportFormatItem = new ExportFormatItem(reportViewer)
                    {
                        Id = "PDF",
                        Format = DevExpress.XtraPrinting.ExportFormat.Pdf,
                        Text = "PDF"
                    };
                reportViewer.ExportModel.AvailableFormats.Add(pdfExportFormatItem);
            }
    
        }
    }
    

    Implements

    Inheritance

    Object
    ToolbarItem
    ExportFormatItem
    See Also