Home - Forums-.NET - FlyTreeView (ASP.NET) - How to disable a Context Menu Item on the server side?

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

How to disable a Context Menu Item on the server side?
Link Posted: 25-May-2007 06:59
Hi,

I'm evaluating FlyTreeView. One of the things I need support for is to conditionally enable/disable a menu item in a context menu for a particular node.

I've seen the example where this is done in client code. I would like to do this on the server side, when I'm adding the node to the tree in a populate on demand event.

I have several Node Types setup, which are tied to a partiucular context menu. When I create the node, I set the NodeTypeID for the node. I would now like to get access to a particular item. How do I do this?

Thanks,
Rich
Link Posted: 25-May-2007 07:27
I believe I found a solution. Let me know if this isn't the recommend way of doing this.

Just make an alternate ContextMenu, with the particular item in question disabled...then associate this menu with the node, instead of my original menu.

Sometimes, I'm a little slow, but I'll get it eventually...

  

Thanks,
Rich
Link Posted: 25-May-2007 19:58
Yes, this is the only server side way.