Free Trial Buy Now

NavBar - Client-Side Functionality

  • Platform
    • Windows
    • Linux
    • Mac OS
  • SQL Server
  • Browser
  • Language

Description

This example demonstrates available ways to manipulate the DevExpress MVC NavBar 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: v2012 vol 2.8
Experience the DevExpress Difference Today
Demos with source code are included with an installation of DevExpress controls for ASP.NET. Refer to the Demos and Sample Applications topic to learn more.
To download your free evaluation copy of our award-winning ASP.NET libraries, visit the Downloads page
All DevExpress MVC Extensions ship as part of DXperience ASP.NET, Enterprise, and Universal.
To obtain pricing information, visit the Pricing Options page or contact us via Email at info@devexpress.com
or by telephone at +1 (818) 844-3383 between 8:30am and 5pm Pacific Time.