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

NavBarGroup.DataItem Property

Gets the data item that is bound to the navbar group.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public object DataItem { get; set; }
Public Property DataItem As Object

Property Value

Type Description
Object

A Object that represents the data item that is bound to the navbar group.

Remarks

When the navbar control is bound to a data source, such as a XmlDataSource object, this property is set to the data item that is bound to this specific navbar group. This property is commonly used to access the value of the data item.

NOTE

This property is available only after data binding has occurred.

Examples

...
protected void ASPxNavBar1_GroupDataBound(object source, NavBarGroupEventArgs e) {
         IHierarchyData hierarchyData = (e.Group.DataItem as IHierarchyData);
         XmlElement xmlElement = hierarchyData.Item as XmlElement;
         XmlAttributeCollection attributes = xmlElement.Attributes;

         if (xmlElement.Attributes["View"] != null)
             e.Group.Text = xmlElement.Attributes["View"].Value;
     }
...
See Also