Can a RadMenu have multiple ItemSources?

2 posts, 0 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 20 Jan 2010 Link to this post

    I have a RadMenu in my application where I would like to have the ItemsSource property "partially bound" to some data object and have a few extra items thrown on top.  The important part here is to use binding somehow so that when the list changes, the partially bound part of the menu changes.

    My eventual goal would be to have a list of static menu items (New, Open), a separator, and then a bound list of dynamic items (a list of recently used files) like the following...   As users are navigating to files, the list of recently used files would be changing and I would like that to be updated via binding...

    File (TopLevel)
    Is there a way to do this neatly?
  2. Hristo
    Hristo avatar
    832 posts

    Posted 21 Jan 2010 Link to this post

    Hello Rob,

    Adding multiple ItemSources is not an option here. But you can easily modify the collection that you set as ItemsSource. This will allow you to use databinding and dynamic source for sub menuitems.
    As you know RadMenu is hierarchical control so you can use HierarchicalDataTemplate to specify the source for the sub menuitems.
    You can find a demo here:

    Let us know if you need more information.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
Back to Top