Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PopupMenuType Enum

Lists values that identify the context menu type.

#Declaration

TypeScript
enum PopupMenuType {
    ColumnHeading,
    RowHeading,
    SheetTab,
    Picture,
    Chart,
    Cell,
    AutoFilter,
    PivotTable,
    PivotTableAutoFilter
}

#Members

Name Description
AutoFilter

Specifies a context menu for the AutoFilter drop-down arrow.

Cell

Specifies a context menu for a cell in a worksheet.

Chart

Specifies a context menu for a chart in a worksheet.

ColumnHeading

Specifies a context menu for a column header.

Picture

Specifies a context menu for a picture embedded in a worksheet.

PivotTable

Specifies a context menu for a cell in a pivot table.

PivotTableAutoFilter

Specifies a context menu for the AutoFilter drop-down arrow on the row or column label of a pivot table.

RowHeading

Specifies a context menu for a row header.

SheetTab

Specifies a context menu for a worksheet tab.

#Remarks

The values listed by this enumerator are used to set the menuType property’s value.

#Example

For a full example, see Spreadsheet - Context Menu Customization demo.

function SpreadsheetPopupMenuShowing(s, e) {
      if (e.menuType === PopupMenuType.Cell) {
          e.menuItems.Clear();
          if (needToAddCustomMenuItems(s)) {
              if (isSelectedCellOfType(s, currencyColumns))
                  addCustomMenuItem(e.menuItems, convertCurrencyCommand);
              if (isSelectedCellOfType(s, discountColumns))
                  addCustomMenuItem(e.menuItems, discountCommand);
              if (isSelectedCellOfType(s, weightColumns))
                  addCustomMenuItem(e.menuItems, convertUnitsCommand);
          }
      }
      else if (e.menuType !== PopupMenuType.AutoFilter)
          e.cancel = true;
}