Tab
A newer version of this page is available. Switch to the current version.

ASPxNavBar Class

Represents the web navigation bar control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

public class ASPxNavBar :
    ASPxHierarchicalDataWebControl,
    IRequiresLoadPostDataControl,
    IControlDesigner
Public Class ASPxNavBar
    Inherits ASPxHierarchicalDataWebControl
    Implements IRequiresLoadPostDataControl,
               IControlDesigner

Remarks

Add an ASPxNavBar control to your web application to provide it with the advanced navigation capabilities. This control allows you to display a number of Items arranged into different groups. The ASPxNavBar control supports the following common features:

  • Data binding that allows the control's groups and items to be bound to hierarchal data sources.
  • Programmatic access to the navbar object model to dynamically create groups, populate them with items, set properties, and so on.
  • Programmatic access to the navbar client-side object model to perform specific client actions with groups and items.
  • An ability to perform round-trips to the server using the AJAX-based callback technology.
  • Customizable appearance through themes, user-defined images, styles, and user-defined templates.

Groups of the navbar control can be accessed by the ASPxNavBar.Groups property. Each group has its collection of items available using the NavBarGroup.Items property. The ASPxNavBar control also maintains a specific ASPxNavBar.Items collection which contains all the items from all the groups. This collection allows you to easily iterate through all navbar items or access an individual item by specifying its name or display text.

Groups of items can be expanded/collapsed either using the user interface or programmatically (see the NavBarGroup.Expanded property and the NavBarGroupCollection.ExpandAll method) in order to show/hide their contents. The visibility and the visual order of items within their groups and groups within the navbar control can be controlled by the NavBarItem.Visible and NavBarItem.VisibleIndex properties of items and the NavBarGroup.Visible and NavBarGroup.VisibleIndex properties of groups.

You can make the items or headers of groups act like hyperlinks or implement the desired custom behavior. Custom behavior of items or group headers can be implemented by handling their click events (such as the ASPxNavBar.ItemClick and ASPxNavBar.HeaderClick). To make an item or a group header serve as a link, use the item's NavBarItem.NavigateUrl or the group's NavBarGroup.NavigateUrl property respectively to specify the linked page. By default, a linked page is displayed in the same window or frame as the