Skip to main content

NavBarGroup.Items Property

Gets the collection of items within the group and provides indexed access to them.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web


public NavBarItemCollection Items { get; }

Property Value

Type Description

A NavBarItemCollection object representing the collection of the group’s items.


The Items property provides access to a collection that contains all the items of the current group. This collection provides standard means to manipulate (add or remove) items within a group. A particular item can be accessed using index notation.

If you need to obtain a collection that holds all the items of the navbar control, you can use the ASPxNavBar.Items property.


This example demonstrates how to modify the ASPxNavBar‘s group header content.

using DevExpress.Web.ASPxNavBar;
protected void Page_Load(object sender, EventArgs e) {
     NavBarGroup group1 = new NavBarGroup("group1", "group1");
     NavBarItem item1 = new NavBarItem("item1", "item1");


     group1.HeaderTemplate = new MyTemplate();
     group1.HeaderTemplateCollapsed = new MyTemplate1();


public class MyTemplate : ITemplate {
     void ITemplate.InstantiateIn(Control container) {
          Label label = new Label();
          label.Text = "The group is expanded";

public class MyTemplate1 : ITemplate {
     void ITemplate.InstantiateIn(Control container) {
          Label label2 = new Label();
          label2.Text = "The group is collapsed";
See Also