Posted 30 Apr 2008
Link to this post
I'd like to use my RadMenu to show the SiteMapDataSource contents, and further be able to style the individual buttons using CSS. This requires that I be able to set the ID of each <li> generated by the menu. I can include the ID in the Web.SiteMap xml and if I was using a basic repeater could then just bind the LI id attribute to that value. Is there a way to declaratively bind the ID property of each LI generated by the rad menu to a property of its datasource item?
Here is how it works with a repeater:
<ItemTemplate><li id='<%# ((SiteMapNode)Container.DataItem)["id"] %>'> </li>
If I have to achieve the same result by building the rad item template myself, then the menu doesn't really give me anything the repeater didn't. I was hoping to start using the menu more generally, but in this first instance I seem to have already found an exception where it can't replace my standard code.