DashboardMenuItem.disabled Property
Gets whether a dashboard menu item is disabled.
Namespace: DevExpress.Dashboard
Assembly: DevExpress.Dashboard.v17.2.Web.Scripts.dll
Declaration
Property Value
| Type | Description |
|---|---|
| DevExpress.Web.Scripts.KnockoutObservableBoolean | true, if a dashboard menu item should be disabled; otherwise, false. |
Remarks
The property can accept the computed observables. To learn more, see Computed Observables.
For example, the function in the code below returns true when your application does not have any dashboards. In this case, the saveAsItem menu item is disabled.
function onBeforeRender(sender) {
var dashboardControl = sender.GetDashboardControl();
var toolbox = dashboardControl.findExtension("toolbox");
var saveAsItem = {
id: this.name,
title: "Save As",
// ...
disabled: ko.computed(function () { return !dashboardControl.dashboard(); })
}
toolbox.addMenuItem(saveAsItem);
}
See Also