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

Client-Side Menu Item Remove

7 Answers 118 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 2
Brad asked on 04 Aug 2009, 06:41 PM
Hi,

I'm having a problem with removing menu items from the client side.  Specifically, I run into an issue when I try to remove the last root menu item.

I have noticed that you have the same issue in your demo here:  http://demos.telerik.com/aspnet-ajax/menu/examples/programming/addremovedisableitemsclientside/defaultcs.aspx

To reproduce the problem, select "Books", click "Delete selected Item", then, select "Music" and click "Delete selected Item".  You will find that the Music menu item still exists in the menu, and when you move the cursor over the menu, it throws a javascript exception.  Is there a known work-around for this issue?

Thanks,

Brad

7 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 05 Aug 2009, 04:07 PM
Hello Brad,

Thank you for reporting this issue. Removing the last root item indeed doesn't function properly. The workaround for now would be to use clear instead:

$find("RadMenu1").get_items().clear();

We'll take care fix the issue. As a token of our gratitude for your involvement, your Telerik points have been updated.

Kind regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 21 May 2013, 08:45 PM
FYI, this issue appears to still exist in the 2013.1.403.40  version of the Menu,

Also, when you call clear(), it appears that a 1 pixel sized "residue" of the menu border remains. This occurs in all browsers from what I have seen. I have attached screen captures. The first (menu_before_add_item.jpg) just depicts an area where I have an empty menu and dynamically add items via JavaScript. The second (menu_item_added.jpg), shows the menu after I add an item through JavaScript. The third (menu_after_clear), shows what remains after I clear all menu items. As you can see there appears to be a piece of the border remaining. It doesn't appear to matter which skin is used.
0
Boyan Dimitrov
Telerik team
answered on 24 May 2013, 02:34 PM
Hello,

Since I am not able to replicate the described issue I have attached a sample project that follows the provided instructions. Could you please clarify what exactly is different in your current project and elaborate a bit more on your scenario. 

 

Regards,
Boyan Dimitrov
Telerik
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
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 28 May 2013, 02:39 PM
The case where the residue occurs is when you have an empty menu, add an item client-side, and them call clear to remove the item. Change your example to have an empty menu declared:

<telerik:RadMenu ID="RadMenu1" runat="server" Flow="Vertical" ClickToOpen="true">
    <Items>
    </Items>
</telerik:RadMenu>


then add an item client-side and then call clear to remove the item so the menu is empty once again, as per my screenshots.
0
Boyan Dimitrov
Telerik team
answered on 31 May 2013, 11:28 AM
Hello,

Thank you for getting back to us.

I would like to confirm that I have reproduced that issue and it seems to be a misbehavior. The issue is already logged in our system for future fixing. 

As a token of gratitude I updated you Telerik points. 

Do not hesitate to contact us if you have any further questions. 

Regards,
Boyan Dimitrov
Telerik
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
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 31 May 2013, 11:42 AM
ok, thanks. Please be aware that the original issue this thread discusses is still there, so hopefully that will be fixed soon too.
0
Boyan Dimitrov
Telerik team
answered on 05 Jun 2013, 10:27 AM
Hello,

Thank you for your feedback. 

Indeed the issue with our RadMenu demo still exists and we will fix it as soon as possible as well.

We would like to apologize for any inconveniences caused.  

Regards,
Boyan Dimitrov
Telerik
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.
Tags
Menu
Asked by
Brad
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Boyan Dimitrov
Telerik team
Share this question
or