Skip to main content

data

Optional. Specifies an array of data objects to set into Menu

info

Please note that if you specify the id fields in the tree collection, their values should be unique. You can also omit the id fields in the tree collection. In this case they will be generated automatically.

data?: object[];

Example

const menu = new dhx.Menu("menu_container", {
data: [{
"id": "edit",
"value": "Edit",
"hotKey": "ctrl-z",
"count": 25,
"countColor": "success",
"items": [{
"id": "undo",
"value": "Undo",
"icon": "dxi dxi-undo",
"hotKey": "Ctrl-z",
"count": 25,
"countColor": "danger",
"items": [
{
"id": "redo1",
"value": "Redo",
"icon": "dxi dxi-redo",
"disabled": "true"
},
{
"type": "separator"
},
{
"id": "lock1",
"value": "Lock cell",
"icon": "dxi dxi-key"
}
]
}]
}]
});