Skip to main content
All docs
V24.2

ASPxClientGanttContextMenuItem.enabled Property

Specifies whether the item is enabled.

Declaration

enabled: boolean

Property Value

Type Description
boolean

true to enable the item; otherwise, false.

Remarks

<dx:ASPxGantt ID="Gantt" ClientInstanceName="clientGantt" >
    //...
    <ClientSideEvents
      ContextMenuCustomization="function(s, e) {
          // Creates a custom context menu item
          var customItem = new ASPxClientGanttContextMenuItem();
          customItem.name = 'ToggleResourcesVisibility';
          customItem.text = 'Toggle Resources Visibility';
          customItem.enabled = false;
          customItem.beginGroup = true;

          // Adds a custom context menu item
          e.menuItems.Add(customItem);
      }
      CustomCommand="function(s, e) {
          if(e.commandName == 'ToggleResourcesVisibility') {
              showResources = !showResources;
              clientGantt.ShowResources(showResources);
          }
      }
    />
</dx:ASPxGantt>

Examples

See Also