THEMES
THEME SETTINGS

Navigation and Layout - NavBar Client-Side Functionality

  • Platform
  • SQL Server
  • Browser
  • Language

This example demonstrates available ways to manipulate the DevExpress MVC Navigation Bar programmatically on the client using our extended client-side functionality. The client object of the NavBar can be accessed on the client-side by its Name.

In this demo, each NavBar group or item is identified using its Name property. In order to obtain a specific group or item by its name on the client, the GetGroupByName or GetItemByName method is used respectively. In this demo, the NavBar's AutoCollapse mode is enabled, specifying that only one group can be expanded within the NavBar at any one time. In this mode, a group's SetExpanded method can be used to expand the desired group.

A given NavBar item can be selected within each group via the SetSelectedItem method by passing it the required item.

The GroupExpandedChanged function that is a handler of the NavBar's ExpandedChanged event demonstrates how to synchronize values of the dropdown editors with the expanded group and the group's selected item, if any.

Version: v2017 vol 1.3
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at info@devexpress.com or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.