How to set URL in RadMenuItem

2 posts, 0 answers
  1. Terry
    Terry avatar
    157 posts
    Member since:
    Jul 2009

    Posted 16 Oct 2009 Link to this post

    Hi:

    I want to dynamically create menu items an arbitrary number of levels deep from a database.  Each RadMenuItem will get a Header value and a url (a xaml file name) to go to when that item is clicked.  I expected to find a URL or a NavigateURL property in the RadMenuItem object, but I don't see one.  So what I want to do is retrieve the url from the item generating the click inside of the RadMenu click event.  What property should I use?  Can you show me some code to set the urls as I add the menu items?

    Thanks,

    Terry
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 21 Oct 2009 Link to this post

    Hi Terry,

    Generally, you could use the Tag property to store additional data for RadMenuItem - in the ItemClick event handler you could get the value of the Tag property and navigate the browser. Other option would be to data-bind RadMenu like most of our online examples do.

    Sincerely yours,
    Valeri Hristov
    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