This example demonstrates available ways to manipulate the DevExpress MVC Menu programmatically on the client using our extended client-side functionality. The client object of the Menu can be accessed on the client by its Name.
In this demo, each Menu item is identified using its Name property. In order to obtain a specific menu item by its name on the client, the GetItemByName method is used. A specific menu item can be selected using SetSelectedItem, by passing it the required item.
The MenuItemClick function that is a handler of the Menu's ItemClick client event demonstrates how to synchronize the dropdown editor's value with the name of the clicked menu item.
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
The source code files for this demo are installed (by default) in the following directory:
Open CS Solution
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxNavigationAndLayoutDemos