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

RadMenu URL Gets Corrupted on Disable/Enable

4 Answers 47 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Velma
Top achievements
Rank 1
Velma asked on 21 Dec 2011, 09:26 PM
Part of the workflow of my application is that my RadMenu is on occasion disabled, and then re-enabled. On re-enable, the URLs of the top level menu items are corrupted. For example, I have:

            <telerik:RadMenuItem Text="Home" ToolTip="Home" Value="" NavigateUrl="~/home.aspx" />

as a top level menu item.

If I look at the source of the page, this is rendered as 

<a title="Home" class="rmLink rmRootLink" href="../home.aspx">


I then run my Javascript to disable, and then re-enable:

    function ShowMenu(enable)

    {

        var menu = $find("<%= OasisMenu.ClientID %>");

        if (enable)

            menu.enable();

        else

            menu.disable();

    }


at that point, the rendering becomes:

<a title="Home" class="rmLink rmRootLink" href="~/home.aspx" jQuery16405095697138168546="7">

and when I click on it it becomes:
http://localhost:11578/Personnel/~/home.aspx
well, it becomes a 404 page.

This only applies to the three menu items at the top level that are links. The second level menu items are fine.

I posted the whole menu in a previous menu problem question a couple of days ago, but can post again if it would be helpful (or I can put in a support ticket, if that would be helpful). Any fix? Any workaround? (Since it's just three items, I suppose there's some way I could save them and reset them in the Javascript?)

This is Telerik.Web.UI 2011.3.1115.40, by the way.



4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Dec 2011, 04:35 PM
Hi Velma,

Thank you for reporting this issue. I verified that this is indeed a bug with RadMenu, so I logged it and we will fix it for the next internal build.


Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Velma
Top achievements
Rank 1
answered on 27 Dec 2011, 04:40 PM
Thank you. I think that means the fix will be in the next release? I am going to try to build a workaround, but saving the URL values and resetting them, in Javascript. I may be able to work it out from the documentation. But if you have any sample on this, that would be helpful.  
0
Peter
Telerik team
answered on 27 Dec 2011, 07:22 PM
Hello,

The fix will be available even earilier, since we have already resolve the issue with the RadMenu code. You just need to download the internal build at the end of this week or next week at latest.

Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Velma
Top achievements
Rank 1
answered on 28 Dec 2011, 03:48 PM
Thank you. I don't want to get an interim build which hasn't been fully tested, as that would update all our Telerik controls, not just the menu. But I was able to work around the bug by redoing the URLs for those menu items to not use the "~". So I'm good on this for now.
Tags
Menu
Asked by
Velma
Top achievements
Rank 1
Answers by
Peter
Telerik team
Velma
Top achievements
Rank 1
Share this question
or