Skip to main content
All docs
V24.1

ASPxClientGanttContextMenuItemCollection.Add(item) Method

Adds a context menu item.

Declaration

Add(
    item: ASPxClientGanttContextMenuItem
): void

Parameters

Name Type Description
item ASPxClientGanttContextMenuItem

The context menu item.

Remarks

<dx:ASPxGantt ID="Gantt" ClientInstanceName="clientGantt" >
    //...
    <ClientSideEvents
      ContextMenuCustomization="function(s, e) {
          ...
          // Creates a subitem
          var customSubItem = new ASPxClientGanttContextMenuItem();
          customSubItem.name = 'Subitem1';
          customSubItem.text = 'Subitem1';

          // Adds the subitem to the parent item.
          customItem.GetSubItems().Add(customSubItem);
          ...
      }
    />
</dx:ASPxGantt>

Examples

Online Demo

See Also