Skip to main content
All docs
V25.2
  • ToolbarItem.GetEnabled Property

    Specifies a function that determines whether the item is enabled.

    Namespace: DevExpress.Blazor.Reporting.Models

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

    NuGet Package: DevExpress.Blazor.Viewer

    Declaration

    public Func<bool> GetEnabled { get; set; }

    Property Value

    Type Description
    Func<Boolean>

    A function that returns true if an item is enabled; otherwise, false.

    Remarks

    The following code sample hides the Export To drop-down list in the toolbar:

    @using DevExpress.Blazor.Reporting.Models;
    // ...
    <DxReportViewer @ref="reportViewer"
                     OnCustomizeToolbar="OnCustomizeToolbar"/>
    
    @code {
        DxReportViewer reportViewer;
    
        void OnCustomizeToolbar(ToolbarModel toolbarModel)
        {
            foreach (var item in toolbarModel.AllItems)
            {
                if (item.Id == "ExportTo")
                {
                    item.GetEnabled = () => { return false; };
                    item.Visible = false;
                }
            }
        }
    }
    
    Built-In Toolbar
    Blazor Report Viewer -- Built-In Toolbar
    Customized Toolbar
    Blazor Report Viewer -- Customized Toolbar

    Implements

    See Also