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

Radmenu itemclick event and navgateurl

5 Answers 151 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Joseph
Top achievements
Rank 2
Joseph asked on 04 Oct 2010, 02:58 PM
Hello Telerik Team,

I am a newbie to telerik and am tryting accomplish something with radmenu on an asp.net 4 page.
I use the radmenu and the menu is placed on the top of the page. When any menu item is clicked I want to create a menu programaticaly (including root and sub-menu of the item clicked) in the left side panel of the screen. I was able to create it using onitemclick event when I dont specify a navigateurl for the item. Once I specify navigateurl for menuitems I was not able to create the side panel menu, mean I dont see it goes to onitemclick event, but directly goes to navigateurl.  The main top menu is not connected to any; it is created directly using the menu builder from Radmenu. 

Also when I create the sidepanel menu, I want to make the item that clicked being displayed in grey (which indicates that is the item currently clicked).

Please show me how to do this. Your help is greatly appreciated.

Thanks

5 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 04 Oct 2010, 03:36 PM
Hello Joseph,

That is exactly how the control should behave since setting NavigateUrl makes the menu item a link, which does not postback. If you want the ItemClick event to occur, you could set a value to the menu item and then in the ItemClick event, check that value and redirect them to the url. That is the only way you can raise the ItemClick event and navigate them to the desired page.

I hope that helps.
0
Joseph
Top achievements
Rank 2
answered on 04 Oct 2010, 08:57 PM
Thanks Cori.
Now I understood how it works. I thought I can easily create the side panel menu, but I am having trouble in creating it. Can you help me. When the main menu is clicked (main menu is in the top penel which I created using Rad menu builder, which do not use any data binding - database or xml but have set Text and value properties).  I cleared all the navgateurl from menu items. Inside onitemclick event I want to create the side panel menu before re-directing pages. I drop a radmenu control in the side panel but did not create any items in the aspx code. How do I add items to this sidepanel menu from the event?

Is there any other better way to do this.

Thanks
0
Accepted
Veronica
Telerik team
answered on 08 Oct 2010, 01:23 PM
Hi Joseph,

Please take a look at this help topic about adding new RadMenuItems with javascript. 

Let me know if you have further questions. 

Kind regards,
Veronica MIlcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Peter
Telerik team
answered on 08 Oct 2010, 01:29 PM
Hi Joseph,


All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Joseph
Top achievements
Rank 2
answered on 08 Oct 2010, 03:47 PM
Thanks for the help. It greately appreciated.
Tags
Menu
Asked by
Joseph
Top achievements
Rank 2
Answers by
Cori
Top achievements
Rank 2
Joseph
Top achievements
Rank 2
Veronica
Telerik team
Peter
Telerik team
Share this question
or