# ContextMenu

This topic lists the members for the ContextMenu class available in Spread for ASP.NET. Learn more in documentation.

## Content

The **ContextMenu** class consists of the following members. You can use this class to disable a menu item on the client side.

| **Constructor** | **Description** |
| ----------- | ----------- |
| public ContextMenu(); | Initializes a new instance of the ContextMenu class |

| **Property** | **Description** |
| -------- | ----------- |
| public Array Items {get;} | Gets the MenuItem collection |

| **Method** | **Description** |
| ------ | ----------- |
| GetItem(name: string); | Gets a menu item using text |
| SetEnabled(enabled); | Sets the menu item enabled state |
| GetEnabled(); | Gets the menu item enabled state |
| GetText(); | Gets the menu item text |

This is a sample that disables a menu item. On the client side, the script would look like this:

```javascript
function onContextMenuOpening(event)
{
  var menu = event.ContextMenu;
  var copyItem = menu.GetItem("Copy");
  copyItem.SetEnabled(false);
}
```