MenuItem
Warning: This API is now obsolete.
Change to PopupMenuItem
Menu Item Related Setting Information Model
Signature:
export interface MenuItemRemarks
Objects created using the PopupMenuItem format can be converted to GridBase.onMenuItemClicked and GridBase.onContextMenuItemClicked It is used as a parameter when specifying a callback.
Or, when using GridBase.addPopupMenu(), it is in the form of menuItem among the parameters of callback.
Example
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 | MenuItemClick | Callback called when clicked | 
Properties
| Property | Type | Description | 
|---|---|---|
| checked | boolean | Whether to check when type is “check” or “radio” | 
| enabled | boolean | Clickable | 
| group | string | When the menu group or type is "radio", select only one within the same group | 
| label | string | Name to be displayed in menu | 
| parent | PopupMenu | Parent: MenuItem object | 
| tag | any | Tags | 
| type | MenuItemType | Menu Item Type | 
| visible | boolean | Visibility | 
Events Desc
callback
Callback called when clicked
Type - MenuItemClick
Properties Desc
checked
Whether to check when type is “check” or “radio”
Type - boolean
enabled
Clickable or not
Type - boolean
group
When the menu group or type is "radio", select only one within the same group.
Type - string
label
Name to be displayed in menu
Type - string
parent
Parent: MenuItem object
Type - PopupMenu
tag
tag
Type - any
type
Menu item type
Type - MenuItemType
visible
Visibility
Type - boolean