{/* Do not edit this file. It is automatically generated by API Documenter. */}


## MenuItem

> Warning: This API is now obsolete.
>
> Change to PopupMenuItem
>

Menu Item Related Setting Information Model

**Signature:**

```typescript
export interface MenuItem
```

## Remarks

Objects created using the [PopupMenuItem](/refs/Interface/PopupMenuItem) format can be converted to [GridBase.onMenuItemClicked](/refs/Class/GridBase#onmenuitemclicked) and [GridBase.onContextMenuItemClicked](/refs/Class/GridBase#oncontextmenuitemclicked) It is used as a parameter when specifying a callback.

Or, when using [GridBase.addPopupMenu()](/refs/Class/GridBase#addpopupmenu), it is in the form of `menuItem`{/* */} among the parameters of [callback](/refs/Interface/PopupMenuItem#callback).

## Example


```js
gridView.addPopupMenu("menu1", [
         {
              label: "alpha",
              callback: function(grid, menuItem, index) {
                  console.log("aa")
                  console.log(menuItem); // object of that type
                  console.log(clickData);
              }
         },
         {label: "beta"},
         {label: "gamma"}
]);
```

## Events

| Property | Type | Description |
| --- | --- | --- |
| [callback](/refs/Interface/MenuItem#callback) | [MenuItemClick](/refs/realgrid#menuitemclick) | Callback called when clicked |

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [checked](/refs/Interface/MenuItem#checked) | boolean | Whether to check when type is “check” or “radio” |
| [enabled](/refs/Interface/MenuItem#enabled) | boolean | Clickable |
| [group](/refs/Interface/MenuItem#group) | string | When the menu group or type is "radio", select only one within the same group |
| [label](/refs/Interface/MenuItem#label) | string | Name to be displayed in menu |
| [parent](/refs/Interface/MenuItem#parent) | [PopupMenu](/refs/Interface/PopupMenu) | Parent: MenuItem object |
| [tag](/refs/Interface/MenuItem#tag) | any | Tags |
| [type](/refs/Interface/MenuItem#type) | [MenuItemType](/refs/realgrid#menuitemtype) | Menu Item Type |
| [visible](/refs/Interface/MenuItem#visible) | boolean | Visibility |

## Events Desc

### callback

Callback called when clicked

`Type` - [MenuItemClick](/refs/realgrid#menuitemclick)

<hr/>

## Properties Desc

### checked

Whether to check when type is “check” or “radio”

`Type` - boolean

<hr/>

### enabled

Clickable or not

`Type` - boolean

<hr/>

### group

When the menu group or type is "radio", select only one within the same group.

`Type` - string

<hr/>

### label

Name to be displayed in menu

`Type` - string

<hr/>

### parent

Parent: MenuItem object

`Type` - [PopupMenu](/refs/Interface/PopupMenu)

<hr/>

### tag

tag

`Type` - any

<hr/>

### type

Menu item type

`Type` - [MenuItemType](/refs/realgrid#menuitemtype)

<hr/>

### visible

Visibility

`Type` - boolean

<hr/>