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

Different template per menu level

3 Answers 48 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 03 Aug 2009, 03:14 PM
Hi,

I am trying to create a menu that has a different template per level. i.e First level is just a label and then the second level is a UserControl implementing ITemplate. It is the same Usercontrol for all the 2nd level menu items.

  |-- Users (text label)
  |    |-- Gallery UserControl (datasource is children of users)
  |
  |-- Locations (text label)
  |    |-- Gallery UserControl (datasource is children of locations)   
  |

Is this possible?

Thanks

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 05 Aug 2009, 12:29 PM
Hello Jonathan,

Yes, this is possible using a per item template as shown in this help topic:
http://www.telerik.com/help/aspnet-ajax/menu_templatesoverview.html


Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jonathan
Top achievements
Rank 1
answered on 05 Aug 2009, 05:53 PM
Hi Peter,

Thanks for your response, but I don't think I posted enough detail previously.

I am binding to the RadMenu from a hierarchical datasource as the menu items will be different for each user.

Any further suggestions?

Thanks
0
Atanas Korchev
Telerik team
answered on 06 Aug 2009, 03:46 PM
Hello Jonathan,

Since we currently do not provide per level templates out of the box you need to use a code behind workaround. I have attached a sample project which demonstrates that approach.

Kind regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Menu
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Peter
Telerik team
Jonathan
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or