Radmenu itemclick event and navgateurl

6 posts, 1 answers
  1. Joseph
    Joseph avatar
    7 posts
    Member since:
    May 2008

    Posted 04 Oct 2010 Link to this post

    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
  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 04 Oct 2010 Link to this post

    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.
  3. Joseph
    Joseph avatar
    7 posts
    Member since:
    May 2008

    Posted 04 Oct 2010 Link to this post

    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
  4. Answer
    Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 08 Oct 2010 Link to this post

    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
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 08 Oct 2010 Link to this post

    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
  6. Joseph
    Joseph avatar
    7 posts
    Member since:
    May 2008

    Posted 08 Oct 2010 Link to this post

    Thanks for the help. It greately appreciated.
Back to Top