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

How to set URL in RadMenuItem

1 Answer 77 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 16 Oct 2009, 10:30 PM
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

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 21 Oct 2009, 03:47 PM
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.
Tags
Menu
Asked by
Terry
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or