This is a migrated thread and some comments may be shown as answers.

RadMenu, SiteMap, and ID property

0 Answers 90 Views
Menu
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 30 Apr 2008, 03:52 PM
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"]  %>'>&nbsp;</li>
       </ItemTemplate>
        </asp:Repeater>

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.

Thanks!

James

No answers yet. Maybe you can help?

Tags
Menu
Asked by
James
Top achievements
Rank 1
Share this question
or