Skip to main content
A newer version of this page is available. .
Tab

ASPxNavBar.SelectedItem Property

Gets or sets the selected item within the navbar control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

public NavBarItem SelectedItem { get; set; }

Property Value

Type Description
NavBarItem

A NavBarItem object representing the selected item.

Remarks

If the ASPxNavBar.AllowSelectItem property is set to true, end users are allowed to select items via mouse clicks. The navbar also provides the ability to select items via code. You can use the SelectedItem property for this purpose.

Note that only one item can be selected within a navbar control at the same time, and this item is displayed selected only if the item link mode in its group is set to the GroupItemLinkMode.ContentBounds value (which can be specified by either the navbar’s ASPxNavBar.ItemLinkMode or the group’s NavBarGroup.ItemLinkMode property).

If none of the items is selected within a navbar control or selecting is prohibited, the SelectedItem property returns null (Nothing in Visual Basic).

In order to select a specific item within a particular group, use the item’s NavBarItem.Selected property instead. The required item can be obtained via its group’s NavBarGroup.Items collection.

See Also