Context Menu

25 Mar 20212 minutes to read

Context Menu is used to improve user interaction with Spreadsheet using popup menu. This will open when right clicking on Cell/Column Header/Row Header/ Pager in Spreadsheet. You can use EnableContextMenu property to enable/disable context menu.

Default Context Menu items

Please find the below table for default context menu items and its actions.

Section
Context Menu items
Action
Row Cell
Cut
Cut the selected cells content to the clipboard, so that you can paste it somewhere else.
Copy
Copy the selected cells content to the clipboard, so that you can paste it to somewhere else.
Paste
Paste the content from clipboard to spreadsheet.
Insert
Insert new cells or rows or columns to worksheet.
Delete
Delete existing cells or rows or columns from worksheet.
Sort
Perform sorting to the selected range of cells by ascending or descending.
Filter
Perform filtering to the selected cells based an active cell's value or active cell's color.
Hyperlink
Create a link in the spreadsheet for quick access to webpages or worksheet reference.
Comment
Add a note or extra information about the active cell.
Format Cells
Apply number format to the selected cells.
Clear Contents
Delete the contents in the selected cells.
Row Header / Column Header
Cut
Cut the selected cells content to the clipboard, so that you can paste it to somewhere else.
Copy
Copy the selected cells content to the clipboard, so that you can paste it to somewhere else.
Paste
Paste the content from clipboard to spreadsheet.
Clear Contents
Delete the contents in the selected cells.
Insert
Insert new cells or rows or columns to worksheet.
Delete
Delete existing cells or rows or columns from worksheet.
Hide
Hide the selected columns / rows.
Unhide
Unhide the selected columns / rows.
Pager
Insert
Insert new worksheet to spreadsheet.
Delete
Delete the selected worksheet from spreadsheet.
Move or copy
Opens move or copy dialog to move worksheet or to create duplicate worksheet.
Rename
Rename the selected worksheet.
Protect Sheet
Prevent unwanted changes from others by limiting their ability to edit.
Hide
Hide the selected worksheet.
Unhide
Opens unhide dialog to unhide worksheet.

The following code example describes the above behavior.

  • HTML
  • <ej:Spreadsheet ID="FlatSpreadsheet" EnableContextMenu="true" runat="server">
    </ej:Spreadsheet>

    ASPNET Spreadsheet Context-Menu Image1

    ContextMenu at Cell

    ASPNET Spreadsheet Context-Menu Image2

    ContextMenu at Column Header

    ASPNET Spreadsheet Context-Menu Image3

    ContextMenu at Row Header

    ASPNET Spreadsheet Context-Menu Image4

    ContextMenu at Pager