-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Menu - Overview
Populate Menu with Data and Configure the Access to It
You can display Menu items from the items array or a dataSource. This demo contains an example of a data structure. If you use a dataSource, specify the displayExpr property.
To access the clicked item, use the onItemClick event handler function.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
<div class="form">
<div>
<div class="label">Catalog:</div>
@(Html.DevExtreme().Menu()
.ID("menu")
.DataSource(d => d.Mvc().LoadAction("GetProducts"))
.HideSubmenuOnMouseLeave(false)
.OnItemClick("menuItem_click")
)
<div id="product-details" class="hidden">
<img src="" />
<div class="name"></div>
<div class="price"></div>
</div>
</div>
<div class="options">
<div class="caption">Options</div>
<div class="option">
<div>Show First Submenu Mode</div>
@(Html.DevExtreme().SelectBox()
.DataSource(new JS("showSubmenuModes"))
.InputAttr("aria-label", "Submenu Mode")
.Value(new JS("showSubmenuModes[1]"))
.DisplayExpr("name")
.OnValueChanged("firstSubMenuMode_changed")
)
</div>
<div class="option">
<div>Orientation</div>
@(Html.DevExtreme().SelectBox()
.DataSource(new[] { "horizontal", "vertical" })
.Value("horizontal")
.InputAttr("aria-label", "Orientation")
.OnValueChanged("menuOrientation_changed")
)
</div>
<div class="option">
@(Html.DevExtreme().CheckBox()
.Value(false)
.Text("Hide Submenu on Mouse Leave")
.OnValueChanged("checkBoxValue_changed")
)
</div>
</div>
</div>
<script>
var showSubmenuModes = [{
name: "onHover",
delay: { show: 0, hide: 500 }
}, {
name: "onClick",
delay: { show: 0, hide: 300 }
}];
function getMenuInstance() {
return $("#menu").dxMenu("instance");
}
function menuItem_click(data) {
var item = data.itemData;
if (item.price) {
$("#product-details").removeClass("hidden");
$("#product-details > img").attr("src", item.icon);
$("#product-details > .price").text("$" + item.price);
$("#product-details > .name").text(item.text);
}
}
function firstSubMenuMode_changed(data) {
getMenuInstance().option("showFirstSubmenuMode", data.value);
}
function menuOrientation_changed(data) {
getMenuInstance().option("orientation", data.value);
}
function checkBoxValue_changed(data) {
getMenuInstance().option("hideSubmenuOnMouseLeave", data.value);
}
</script>
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
Configure the Menu
Use the orientation property to specify whether the Menu has horizontal or vertical orientation. Use the animation property to specify the type, delay, duration, and other options of show and hide menu actions.
Configure the Submenus
Clicking or a hovering a Menu item opens a drop-down menu that can contain several submenus. To specify the drop-down menu mode ("onClick" or "onHover"), use the showSubmenuMode property. If you need only to specify the first level of drop-down menus, use the showFirstSubmenuMode property.
If you want to hide the submenu when the mouse pointer leaves it, set the hideSubmenuOnMouseLeave property to true.
Customize Item Appearance
You can define specific fields in the item data objects to change the appearance of an item. For example, use the icon property to supply items with icons. Define an itemTemplate to customize item appearance.