I have converted a NavBar with hardcoded groups and menu items to one with the datasource pointed to an XML file. With the XML controlled NavBar I am using the GroupHeaderTemplate and ItemTemplate. This is the code I am using (based on an example found here):
<GroupHeaderTemplate>
<%# !string.IsNullOrEmpty(Container.Group.Name) ? Container.Group.Name : Container.Group.Text %>
</GroupHeaderTemplate>
<ItemTemplate>
<a href="<%# Container.Item.NavigateUrl %>">
<%# Container.Item.Text %>
</a>
</ItemTemplate>
<ItemStyle CSSClass="dxnbItem" BackColor="White" />
<DisabledStyle BackColor="White" />
<GroupContentStyle BackColor="White" />
Now the problem. This does not generate the same code as the hardcoded version. The hardcoded version puts class="dxnbItem" and an id in the table cell that surrounds the link, while the datasource version does not. Then javascript is used to add a hover class to the table cells using this function aspxAddHoverItems.
The hardcoded version produces this:
<td id="ctl00_LoginView1_ASPxNavBar1_I0i0_T" class="dxnbItem" style="background-color:White;width:100%;cursor:pointer;"><a href="schedule/workboard.aspx">Workboard</a></td>
While the datasource version produces this:
<td><a
href="schedule/workboard.aspx">Workboard</a></td>
How do I get a value for the id and the class added to the table cell?