change Prometheus menuitem navigate url

4 posts, 0 answers
  1. lakshmi
    lakshmi avatar
    11 posts
    Member since:
    Feb 2008

    Posted 15 Apr 2008 Link to this post

    Is possible change the Prometheus menuitem navigate url from client side with javascript?
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 16 Apr 2008 Link to this post

    Hi Lakshmi,

    Yes, by design you can change the NavigateUrl value with the set_navigateUrl("myUrl") method. Here is a small example:

    <script type="text/javascript">  
    function TweakMenuItem()  
    {  
        var menu = $find("RadMenu1");  
        var menuItem = menu.get_allItems()[0];              
        menuItem.set_text("Telerik");  
        menuItem.set_navigateUrl("http://www.telerik.com");   
    }  
    </script> 
    <telerik:RadMenu ID="RadMenu1" runat="server" Flow="Horizontal">  
        <DefaultGroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
        <Items> 
            <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" NavigateUrl="http://www.yahoo.com" Text="yahoo">  
                <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
            </telerik:RadMenuItem> 
            <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" NavigateUrl="http://www.google.com" Text="google">  
                <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
            </telerik:RadMenuItem> 
        </Items> 
        <ExpandAnimation Type="OutQuart" /> 
    </telerik:RadMenu> 
    <input id="Button1" onclick="TweakMenuItem()" type="button" value="button" /> 

    However, we discovered that the set_navigateUrl() method doesn't work as expected with the current version of Telerik.Web.UI. However, with the Q1 2008 release today, this bug should be fixed.


    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Ioanna Ioannidou
    Ioanna Ioannidou avatar
    1 posts
    Member since:
    Nov 2007

    Posted 27 Aug 2008 Link to this post

    Rather ... does not work at all you mean ....
    Any chance of a fix with the Q2 version ?
  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 01 Sep 2008 Link to this post

    Hi Ioanna,

    I am glad to inform you that the bug has already been fixed. Have you tried with the latest version? Please, feel free to let us know if you experience any problems.


    Kind regards,
    Peter
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top