Home - Forums-.NET - FlyTreeView (ASP.NET) - Remove Context Menu Item from Clientside

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Remove Context Menu Item from Clientside
Link Posted: 13-May-2008 11:09
Is there a way that I can remove a context menu item from clientside? I dont want to use the item.setDisabled(true) function.


Thanks
Link Posted: 13-May-2008 21:13
Client-side API does not allow to remove items. Instead you can create several contextmenu instances and assign to nodes depending on your condition.
Link Posted: 14-May-2008 06:56
Thanks for the response.

But, the problem is that we have a tree with possibly up to 10,000 nodes, and the menu items can be configured individually for each node. In fact, we get the list of menu items (in the domain, we call them verbs) for each nodes with a call to a web-service.

Therefore, it is not possible to build all the menus before hand. Are there any suggestions you can provide? We could potentially modify the div tags (although, I realize that this is not recommended), for the menu, and manage it. Any insights would be very helpful.

All we need to be able to do is completely hide some menu items (not just disable them) on the client side.
Link Posted: 14-May-2008 07:02
You can use menuItem.setText(...) to set required text when context menu pops up.
Isn't it what you were going to modify div tags for?