NavBarItem() Constructor
In This Article
Initializes a new instance of the NavBarItem class.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Remarks
Use this constructor to create a new instance of a NavBarItem class without any specific settings such as the display text or an URL.
Note
When this constructor is used, all properties in the Nav
This constructor is commonly used when dynamically populating the NavBarGroup.Items collection of a NavBarGroup object.
#Example
This example demonstrates how the ASPxNavBar.GroupDataBound and the ASPxNavBar.ItemDataBound events can be used.
protected void ASPxNavBar1_GroupDataBound(object source, DevExpress.Web.NavBarGroupEventArgs e) {
NavBarItem btnItem = e.Group.Items.Add();
btnItem.Template = LoadControl("ContentTemplate.ascx") as ITemplate;
}
protected void ASPxNavBar1_ItemDataBound(object source, NavBarItemEventArgs e) {
if (e.Item.Text == "Canon EOS 400D") {
e.Item.Text = e.Item.Text + " (New model)";
}
}
See Also