Menu Configuration

An object defining configuration options for the dxMenu widget.

activeStateEnabled

A Boolean value specifying whether or not the widget changes its state when interacting with a user.

Type: Boolean
Default Value: true

This option is used when the widget is displayed on a platform whose guidelines include the active state change for widgets.

allowSelection

Deprecated

Use the selectionMode option instead.

allowSelectItem

Deprecated

Use the allowSelection option instead.

animation

An object that defines the animation options of the widget.

Type: animation configuration
Default Value: { show: { type: "fade", from: 0, to: 1, duration: 100 }, hide: { type: 'fade', from: 1, to: 0, duration: 100 } }

contentReadyAction

Deprecated

Use the onContentReady option instead.

cssClass

Specifies the name of the CSS class associated with the menu.

Type: String
Default Value: ''

Use this option to customize the current menu in isolation from other menus created on the same page.

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div>
        <div dx-menu="{ dataSource: menuItems }"></div>
    </div>
    <div>
        <div dx-menu="{ dataSource: menuItems, cssClass: 'customClass' }"></div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
  text-align: center;
}
.demo-page{
    max-width: 600px;
    margin: 0 auto;
}
.demo-page > div{
    display: inline-block;
    background-color: #F0F0F0;
    margin: 10px;
    height: 250px;
}
.customClass .dx-submenu .dx-menu-item{
    background-color: #ffc;
    border-bottom: 1px dotted rgba(0,0,0,.2);
}
.customClass .dx-submenu li:last-child .dx-menu-item {
    border: none;
}
<div class="demo-page">
    <div>
        <div data-bind="dxMenu: { dataSource: menuItems }"></div>
    </div>
    <div>
        <div data-bind="dxMenu: { dataSource: menuItems, cssClass: 'customClass' }"></div>
    </div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ]
}
ko.applyBindings(myViewModel);
body{
  text-align: center;
}
.demo-page{
    max-width: 600px;
    margin: 0 auto;
}
.demo-page > div{
    display: inline-block;
    background-color: #F0F0F0;
    margin: 10px;
    height: 250px;
}
.customClass .dx-submenu .dx-menu-item{
    background-color: #ffc;
    border-bottom: 1px dotted rgba(0,0,0,.2);
}
.customClass .dx-submenu li:last-child .dx-menu-item {
    border: none;
}
<div class="demo-page">
    <div>
        <div id="menuWithoutCssClass"></div>
    </div>
    <div>
        <div id="menuWithCssClass"></div>
    </div>
</div>
var menuItems = [
    {
        text: "Tutorials",
        items: [
            { text: "VS Integration" },
            { text: "UI Widgets" },
            { text: "Data Visualization" },
            { text: "Data Layer" }
        ]
    },
    {
        text: "Guides",
        items: [
            { text: "Demos Inside" },
            { text: "UI Widgets" },
            { text: "Data Visualization" },
            { text: "Themes" },
            { text: "Common" }
        ]
    },
    {
        text: "Reference",
        items: [
            { text: 'Data Library' },
            { text: 'UI Widgets' },
            { text: 'Data Visualization Widgets' },
            { text: 'CSS Classes' },
            { text: 'UI Events' }
        ]
    }
];
$("#menuWithoutCssClass").dxMenu({
    items: menuItems
});
$("#menuWithCssClass").dxMenu({
    items: menuItems,
    cssClass: 'customClass'
});
body{
  text-align: center;
}
.demo-page{
    max-width: 600px;
    margin: 0 auto;
}
.demo-page > div{
    display: inline-block;
    background-color: #F0F0F0;
    margin: 10px;
    height: 250px;
}
.customClass .dx-submenu .dx-menu-item{
    background-color: #ffc;
    border-bottom: 1px dotted rgba(0,0,0,.2);
}
.customClass .dx-submenu li:last-child .dx-menu-item {
    border: none;
}

dataSource

A data source used to fetch data to be displayed by the widget.

Default Value: null

You can assign an array directly to this option as well as use the Data Source provided by the DevExtreme library.

To display widget items, a default template can be used. This template is based on the data source fields that are listed in the Default Item Template section of the widget's API. Alternatively, you can implement a custom item template.

See Also

disabled

A Boolean value specifying whether or not the widget can respond to user interaction.

Type: Boolean
Default Value: false

Create an observable variable and assign it to this option to specify the availability of the widget at runtime.

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{
        items: menuItems,
        bindingOptions: {
            disabled: 'menuDisabled'
        }
    }"></div>
    <div dx-check-box="{
        text: 'disabled',
        bindingOptions: {
            value: 'menuDisabled'
        }
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.menuDisabled = false;
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: left;
}
.dx-checkbox{
    margin: 20px;
}
<div class="demo-page">
    <div data-bind="dxMenu: { 
        items: menuItems,
        disabled: menuDisabled
    }"></div>
    <div data-bind="dxCheckBox: {
        text: 'disabled',
        value: menuDisabled
    }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    menuDisabled: ko.observable(false)
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: left;
}
.dx-checkbox{
    margin: 20px;
}
<div class="demo-page">
    <div id="myMenu"></div>
    <div id="disabledSelector"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ]
});
$("#disabledSelector").dxCheckBox({
    text: "disabled",
    value: false,
    onValueChanged: function (e) {
        $("#myMenu").dxMenu("instance").option("disabled", e.value);
    }
});
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: left;
}
.dx-checkbox{
    margin: 20px;
}

firstSubMenuDirection

Deprecated

Use the submenuDirection option instead.

focusStateEnabled

Specifies whether or not the widget can be focused.

Type: Boolean
Default Value: false

height

Specifies the height of the widget.

Type: Number|String|function
Return Value: Number|String
The widget height.
Default Value: undefined

The option can hold a value of the following types.

  • number
    The height of the widget in pixels

  • string
    A CSS measurement of the widget height (e.g., "55px", "80%", "auto" and "inherit")

  • function
    A function returning the widget height (e.g., height:function(){ return baseHeight - 10 + "%"; })

hint

Specifies the text of the hint displayed for the widget.

Type: String
Default Value: undefined

hoverStateEnabled

A Boolean value specifying whether or not the widget changes its state when being hovered by an end user.

Type: Boolean
Default Value: true

itemClickAction

Deprecated

Use the onItemClick option instead.

itemHoldAction

Deprecated

Use the onItemHold option instead.

itemRender

Deprecated

Use the itemTemplate option instead.

itemRenderedAction

Deprecated

Use the onItemRendered option instead.

items

Holds an array of menu items.

Type: Array

To display menu items, a default template can be used. This template is based on certain fields of the item object. Refer to the Default Item Template section to learn which fields are taken into account when creating a default template for items. Alternatively, you can implement a custom item template.

See Also

NOTE: Each item of the array passed to the items option can include the items field, which takes on an object with the same structure as a root item. Therefore, you can create as many menu levels as you need.

Show Example:
jQuery
<div style="background-color: #F0F0F0; height: 250px; max-width: 450px; margin: 0 auto">
<div data-bind="dxMenu: { items: menuItems }"></div>
</div>
menuItems = [
    {
        text: "Tutorials",
        items: [
            { text: "VS Integration" },
            { text: "UI Widgets" },
            { text: "Data Visualization" },
            { text: "Data Layer" }
        ]
    },
    {
        text: "Guides",
        items: [
            { text: "Demos Inside" },
            { text: "UI Widgets" },
            { text: "Data Visualization" },
            { text: "Themes" },
            { text: "Common" }
        ]
    },
    {
        text: "Reference",
        items: [
            { text: 'Data Library' },
            { text: 'UI Widgets' },
            { text: 'Data Visualization Widgets' },
            { text: 'CSS Classes' },
            { text: 'UI Events' }
        ]
    },
];
body{
  text-align: center;
}

itemSelectAction

Deprecated

Use the onSelectionChanged option instead.

A function performed when a widget item is selected.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
itemData: Object
The data that is bound to the selected item.
itemElement: jQuery
An HTML element representing the item.
itemIndex: Number
Specifies the index of the just selected item.
Default Value: null

Assign a function to perform a custom action when a widget item is selected.

Alternatively, you can assign a URL to which the browser will navigate when a widget item is selected.

itemTemplate

The template to be used for rendering items.

Type: String|function|DOM Node|jQuery
Function parameters:
itemData: Object
The item object to be rendered.
itemIndex: Number
The index of the item to be rendered.
itemElement: jQuery
An HTML element of the item to be rendered.
Return Value: String|DOM Node|jQuery
A template name or a template container.
Default Value: "item"
See Also

NOTE: A binding context of an item template is the data source object that corresponds to the currently rendered item. So, you can bind template elements to the item object's fields directly (see the code above). To access another binding context within an item template, use Knockout/Angular binding variables.

onContentReady

A handler for the contentReady event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
Default Value: null

Assign a function to perform a custom action when widget content is ready.

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{ items: menuItems, onContentReady: contentReady }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.contentReady = function () {
        DevExpress.ui.notify("Content is ready!", "success", 1500);
    }
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div data-bind="dxMenu: { items: menuItems, onContentReady: contentReady }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    contentReady: function () {
        DevExpress.ui.notify("Content is ready", "success", 1500);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div id="myMenu"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    onContentReady: function () {
        DevExpress.ui.notify("Content is ready", "success", 1500);
    }
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}

onDisposing

A handler for the disposing event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
Default Value: null

Assign a function to perform a custom action when you dispose of this component.

onItemClick

A handler for the itemClick event.

Type: function|String
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
itemData: Object
The data that is bound to the clicked item.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the clicked item.
Default Value: null

Assign a function to perform a custom action when a widget item is clicked.

To navigate to a specific URL when the itemClick event fires, assign that URL or the anchor part (#) of that URL directly to this option as a string.

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{ items: menuItems, onItemClick: itemClicked }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.itemClicked = function (data) {
        DevExpress.ui.notify("The \"" + data.itemData.text + "\" item is clicked", "success", 1500);
    }
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div data-bind="dxMenu: { items: menuItems, onItemClick: itemClicked }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    itemClicked: function (data) {
        DevExpress.ui.notify("The \""+ data.itemData.text +"\" item is clicked", "success", 1500);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div id="myMenu"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    onItemClick: function (data) {
        DevExpress.ui.notify("The \""+ data.itemData.text +"\" item is clicked", "success", 1500);
    }
});
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}

onItemContextMenu

A handler for the itemContextMenu event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
itemData: Object
The data that is bound to the item.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the item.
Default Value: null

Assign a function to perform a custom action when the right mouse button is clicked when the pointer is over a widget item, or when the "sustained" (also known as a long press) touch action is performed.

onItemRendered

A handler for the itemRendered event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
itemData: Object
The data that is bound to the item to be rendered.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number
Specifies the index of the rendered item.
Default Value: null

Assign a function to perform a custom action after a collection item is rendered.

onOptionChanged

A handler for the optionChanged event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
value: any
Specifies a new value for the option.
Default Value: null

Assign a function to perform a custom action after an option of the component is changed.

onSelectionChanged

A handler for the selectionChanged event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
Default Value: null

Assign a function to perform a custom action after a collection item is selected or unselected.

onSubmenuHidden

A handler for the submenuHidden event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
rootItem: jQuery
A jQuery object of the root menu element for which the submenu is hidden.
Default Value: null

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{
        items: menuItems,
        onSubmenuHidden: submenuHidden,
        onSubmenuShown: submenuShown
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.submenuHidden = function () {
        DevExpress.ui.notify("Submenu is hidden", "error", 1500);
    };
    $scope.submenuShown = function () {
        DevExpress.ui.notify("Submenu is shown", "success", 1500);
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div data-bind="dxMenu: {
        items: menuItems,
        onSubmenuHidden: submenuHidden,
        onSubmenuShown: submenuShown
    }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    submenuHidden: function () {
        DevExpress.ui.notify("Submenu is hidden", "error", 1500);
    },
    submenuShown: function () {
        DevExpress.ui.notify("Submenu is shown", "success", 1500);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div id="myMenu"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    onSubmenuHidden: function () {
        DevExpress.ui.notify("Submenu is hidden", "error", 1500);
    },
    onSubmenuShown: function () {
        DevExpress.ui.notify("Submenu is shown", "success", 1500);
    }
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}

onSubmenuHiding

A handler for the submenuHiding event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
rootItem: jQuery
A jQuery object of the root menu element for which the submenu is being hidden.
cancel: Boolean
Specifies whether or not to cancel the hiding of the widget.
Default Value: null

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{
        items: menuItems,
        onSubmenuHidden: submenuHiding,
        onSubmenuShown: submenuShowing
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.submenuHiding = function () {
        DevExpress.ui.notify("Submenu is being hidden now", "error", 1500);
    };
    $scope.submenuShowing = function () {
        DevExpress.ui.notify("Submenu is being shown now", "success", 1500);
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div data-bind="dxMenu: {
        items: menuItems,
        onSubmenuHidden: submenuHiding,
        onSubmenuShown: submenuShowing
    }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    submenuHiding: function () {
        DevExpress.ui.notify("Submenu is being hidden now", "error", 1500);
    },
    submenuShowing: function () {
        DevExpress.ui.notify("Submenu is being shown now", "success", 1500);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div id="myMenu"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    onSubmenuHiding: function () {
        DevExpress.ui.notify("Submenu is being hidden now", "error", 1500);
    },
    onSubmenuShowing: function () {
        DevExpress.ui.notify("Submenu is being shown now", "success", 1500);
    }
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}

onSubmenuShowing

A handler for the submenuShowing event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
rootItem: jQuery
A jQuery object of the root menu element for which the submenu is being displayed.
Default Value: null

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{
        items: menuItems,
        onSubmenuHidden: submenuHiding,
        onSubmenuShown: submenuShowing
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.submenuHiding = function () {
        DevExpress.ui.notify("Submenu is being hidden now", "error", 1500);
    };
    $scope.submenuShowing = function () {
        DevExpress.ui.notify("Submenu is being shown now", "success", 1500);
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div data-bind="dxMenu: {
        items: menuItems,
        onSubmenuHidden: submenuHiding,
        onSubmenuShown: submenuShowing
    }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    submenuHiding: function () {
        DevExpress.ui.notify("Submenu is being hidden now", "error", 1500);
    },
    submenuShowing: function () {
        DevExpress.ui.notify("Submenu is being shown now", "success", 1500);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div id="myMenu"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    onSubmenuHiding: function () {
        DevExpress.ui.notify("Submenu is being hidden now", "error", 1500);
    },
    onSubmenuShowing: function () {
        DevExpress.ui.notify("Submenu is being shown now", "success", 1500);
    }
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}

onSubmenuShown

A handler for the submenuShown event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element.
rootItem: jQuery
A jQuery object of the root menu element for which the submenu is displayed.
Default Value: null

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{
        items: menuItems,
        onSubmenuHidden: submenuHidden,
        onSubmenuShown: submenuShown
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.submenuHidden = function () {
        DevExpress.ui.notify("Submenu is hidden", "error", 1500);
    };
    $scope.submenuShown = function () {
        DevExpress.ui.notify("Submenu is shown", "success", 1500);
    };
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div data-bind="dxMenu: {
        items: menuItems,
        onSubmenuHidden: submenuHidden,
        onSubmenuShown: submenuShown
    }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    submenuHidden: function () {
        DevExpress.ui.notify("Submenu is hidden", "error", 1500);
    },
    submenuShown: function () {
        DevExpress.ui.notify("Submenu is shown", "success", 1500);
    }
}
ko.applyBindings(myViewModel);
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}
<div class="demo-page">
    <div id="myMenu"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    onSubmenuHidden: function () {
        DevExpress.ui.notify("Submenu is hidden", "error", 1500);
    },
    onSubmenuShown: function () {
        DevExpress.ui.notify("Submenu is shown", "success", 1500);
    }
});
body{
    text-align: center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
}

orientation

Specifies whether the menu has horizontal or vertical orientation.

Type: String
Default Value: 'horizontal'
Accepted Values: 'horizontal'|'vertical'

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div style="width: 100%; height: 100%;">
        <div dx-menu="{
            items: menuItems,
            bindingOptions: {
                orientation: 'currentOrientation'
            }
        }"></div>
    </div>
    <div class="option">
        <div>Orientation</div>
        <div dx-select-box="{
            items: orientationValues,
            bindingOptions: {
                value: 'currentOrientation'
            }
        }"></div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.orientationValues = ["horizontal", "vertical"];
    $scope.currentOrientation = 'horizontal';
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 40px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}
<div class="demo-page">
    <div style="width: 100%; height: 100%;">
        <div data-bind="dxMenu: { 
            items: menuItems,
            orientation: currentOrientation
        }"></div>
    </div>
    <div class="option">
        <div>Orientation</div>
        <div data-bind="dxSelectBox: {
            items: orientationValues,
            value: currentOrientation
        }"></div>
    </div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    orientationValues: ["horizontal", "vertical"],
    currentOrientation: ko.observable('horizontal')
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 40px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}
<div class="demo-page">
    <div style="width: 100%; height: 100%;">
        <div id="myMenu"></div>
    </div>
    <div class="option">
        <div>Orientation</div>
        <div id="orientationSelector"></div>
    </div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ]
});
$("#orientationSelector").dxSelectBox({
    items: ["horizontal", "vertical"],
    value: "horizontal",
    onValueChanged: function (e) {
        $("#myMenu").dxMenu("instance").option("orientation", e.value);
    }
});
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 40px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}

rtlEnabled

Specifies whether or not the current component supports a right-to-left representation.

Type: Boolean
Default Value: false

If you need to switch the display of this DevExtreme component to right-to-left, enable a specifically designed configuration option - rtlEnabled. When this option is set to true, the text flows from right to left, and the layout the component's elements is reversed. To switch the entire application/site to a right-to-left representation, use the static DevExpress.rtlEnabled field.

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div dx-menu="{
        items: menuItems,
        bindingOptions: {
            rtlEnabled: 'rtlEnabledValue'
        }
    }"></div>
    <div dx-check-box="{
        text: 'rtlEnabled',
        bindingOptions: {
            value: 'rtlEnabledValue'
        }
    }"></div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.rtlEnabledValue = false;
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: left;
}
.dx-checkbox{
    margin: 20px;
}
<div class="demo-page">
    <div data-bind="dxMenu: { 
        items: menuItems,
        rtlEnabled: rtlEnabledValue
    }"></div>
    <div data-bind="dxCheckBox: {
        text: 'rtlEnabled',
        value: rtlEnabledValue
    }"></div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    rtlEnabledValue: ko.observable(false)
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: left;
}
.dx-checkbox{
    margin: 20px;
}
<div class="demo-page">
    <div id="myMenu"></div>
    <div id="rtlSelector"></div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ]
});
$("#rtlSelector").dxCheckBox({
    text: "rtlEnabled",
    value: false,
    onValueChanged: function (e) {
        $("#myMenu").dxMenu("instance").option("rtlEnabled", e.value);
    }
});
body{
    text-align:center;
}
.demo-page{
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: left;
}
.dx-checkbox{
    margin: 20px;
}

selectedItem

The selected item object.

Type: Object
Default Value: null

selectionByClick

Specifies whether or not an item becomes selected if an end-user clicks it.

Type: Boolean
Default Value: false

selectionMode

Specifies the selection mode supported by the menu.

Type: String
Default Value: none
Accepted Values: 'single'|'none'

showFirstSubmenuMode

Specifies by which user interaction the first-level submenu is shown.

Type: String
Default Value: 'onclick'
Accepted Values: 'onHover'|'onHoverStay'|'onClick'

To set an event for displaying the secondary-level submenus, use the showSubmenuMode option.

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div style="width: 100%; height: 100%;">
        <div dx-menu="{
            items: menuItems,
            bindingOptions: {
                showFirstSubmenuMode: 'currentMode'
            }
        }"></div>
    </div>
    <div class="option">
        <div>showFirstSubmenuMode</div>
        <div dx-select-box="{
            items: modeValues,
            bindingOptions: {
                value: 'currentMode'
            }
        }"></div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.modeValues = ["onHover", "onHoverStay", "onClick"];
    $scope.currentMode = "onClick";
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 20px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}
<div class="demo-page">
    <div style="width: 100%; height: 100%;">
        <div data-bind="dxMenu: { 
            items: menuItems,
            showFirstSubmenuMode: currentMode
        }"></div>
    </div>
    <div class="option">
        <div>showFirstSubmenuMode</div>
        <div data-bind="dxSelectBox: {
            items: modeValues,
            value: currentMode
        }"></div>
    </div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    modeValues: ["onHover", "onHoverStay", "onClick"],
    currentMode: ko.observable("onClick")
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 20px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}
<div class="demo-page">
    <div style="width: 100%; height: 100%;">
        <div id="myMenu"></div>
    </div>
    <div class="option">
        <div>showFirstSubmenuMode</div>
        <div id="modeSelector"></div>
    </div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ]
});
$("#modeSelector").dxSelectBox({
    items: ["onHover", "onHoverStay", "onClick"],
    value: "onClick",
    onValueChanged: function (e) {
        $("#myMenu").dxMenu("instance").option("showFirstSubmenuMode", e.value);
    }
});
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 20px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}

showPopupMode

Deprecated

Use the showFirstSubmenuMode option instead.

showSubmenuMode

Specifies the user interaction by which submenus are shown.

Type: String
Default Value: 'onHover'
Accepted Values: 'onHover'|'onHoverStay'|'onClick'

By default, the secondary-level submenus of the dxMenu widget are displayed on the same event as the first-level submenu. To set another event for displaying secondary-level submenus, use the showSubmenuMode option. Alternatively, you can change the event on which the first-level submenu is displayed. For this purpose, use the showFirstSubmenuMode option.

Show Example:
AngularJS
Knockout
jQuery
<div class="demo-page" ng-controller="demoController">
    <div style="width: 100%; height: 100%;">
        <div dx-menu="{
            items: menuItems,
            bindingOptions: {
                showSubmenuMode: 'currentMode'
            }
        }"></div>
    </div>
    <div class="option">
        <div>showSubmenuMode</div>
        <div dx-select-box="{
            items: modeValues,
            bindingOptions: {
                value: 'currentMode'
            }
        }"></div>
    </div>
</div>
var myApp = angular.module('myApp', ['dx']);
myApp.controller("demoController", function ($scope) {
    $scope.menuItems = [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                {
                    text: "UI Widgets",
                    items: [
                        { text: "Knockout Approach" },
                        { text: "jQuery Approach" },
                        { text: "Angular Approach" }
                    ]
                },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ];
    $scope.modeValues = ["onHover", "onHoverStay", "onClick"];
    $scope.currentMode = "onHover";
});
angular.element(document).ready(function () {
    angular.bootstrap(document, ['myApp']);
});
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 20px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}
<div class="demo-page">
    <div style="width: 100%; height: 100%;">
        <div data-bind="dxMenu: { 
            items: menuItems,
            showSubmenuMode: currentMode
        }"></div>
    </div>
    <div class="option">
        <div>showSubmenuMode</div>
        <div data-bind="dxSelectBox: {
            items: modeValues,
            value: currentMode
        }"></div>
    </div>
</div>
var myViewModel = {
    menuItems: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                {
                    text: "UI Widgets",
                    items: [
                        { text: "Knockout Approach" },
                        { text: "jQuery Approach" },
                        { text: "Angular Approach" }
                    ]
                },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ],
    modeValues: ["onHover", "onHoverStay", "onClick"],
    currentMode: ko.observable("onHover")
}
ko.applyBindings(myViewModel);
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 20px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}
<div class="demo-page">
    <div style="width: 100%; height: 100%;">
        <div id="myMenu"></div>
    </div>
    <div class="option">
        <div>showSubmenuMode</div>
        <div id="modeSelector"></div>
    </div>
</div>
$("#myMenu").dxMenu({
    items: [
        {
            text: "Tutorials",
            items: [
                { text: "VS Integration" },
                {
                    text: "UI Widgets",
                    items: [
                        { text: "Knockout Approach" },
                        { text: "jQuery Approach" },
                        { text: "Angular Approach" }
                    ]
                },
                { text: "Data Visualization" },
                { text: "Data Layer" }
            ]
        },
        {
            text: "Guides",
            items: [
                { text: "Demos Inside" },
                { text: "UI Widgets" },
                { text: "Data Visualization" },
                { text: "Themes" },
                { text: "Common" }
            ]
        },
        {
            text: "Reference",
            items: [
                { text: 'Data Library' },
                { text: 'UI Widgets' },
                { text: 'Data Visualization Widgets' },
                { text: 'CSS Classes' },
                { text: 'UI Events' }
            ]
        }
    ]
});
$("#modeSelector").dxSelectBox({
    items: ["onHover", "onHoverStay", "onClick"],
    value: "onHover",
    onValueChanged: function (e) {
        $("#myMenu").dxMenu("instance").option("showSubmenuMode", e.value);
    }
});
body{
    text-align:center;
}
.demo-page{
    width: 400px;
    height: 250px;
    margin: 0 auto;
    background-color: #F0F0F0;
    text-align: center;
}
.option{
    width: auto;
    margin: -70px 20px;
    border-top: dotted 1px #888;
    border-bottom: dotted 1px #888;
}
.option > div{
    margin: 5px;
    display: inline-block;
    width: 40%;
    vertical-align: middle;
}

submenuDirection

Specifies the direction at which the submenus are displayed.

Type: String
Default Value: 'auto'
Accepted Values: 'auto'|'rightOrBottom'|'leftOrTop'

By default, the first submenu is displayed so that it is visible totally, based on the menu location on the page. Use the submenuDirection option to display the first submenu at the bottom or at the top of a root item when the widget's orientation is horizontal, and to the left or to the right when orientation is vertical.

submenuHiddenAction

Deprecated

Use the onSubmenuHidden option instead.

submenuHidingAction

Deprecated

Use the onSubmenuHiding option instead.

submenuShowingAction

Deprecated

Use the onSubmenuShowing option instead.

submenuShownAction

Deprecated

Use the onSubmenuShown option instead.

tabIndex

Specifies the widget tab index.

Type: Number
Default Value: 0

visible

A Boolean value specifying whether or not the widget is visible.

Type: Boolean
Default Value: true

width

Specifies the width of the widget.

Type: Number|String|function
Return Value: Number|String
The widget width.
Default Value: undefined

The option can hold a value of the following types.

  • numeric
    The widget width in pixels.
  • string
    A CSS measurement of the widget width (e.g., "55px", "80%", "auto" and "inherit").
  • function
    The function returning the widget width. For example, see the following code.

    JavaScript
    width: function () { 
        return baseWidth - 10 + "%";
    }