Edit this page

Creating Context Menus from XML Files

The ContextMenus property in RadTreeView for ASP.NET AJAX is a collection of RadTreeViewContextMenu objects. The RadTreeViewContextMenu control inherits the RadContextMenu, which in turn inherits RadMenu.

The easiest way to populate a RadTreeViewContextMenu from an XML document is using the following syntax:

RadTreeView1.ContextMenus.Add(new RadTreeViewContextMenu());
RadTreeView1.ContextMenus[0].LoadContentFile("~/MyContextMenuContentFile.xml");
RadTreeView1.ContextMenus.Add(new RadTreeViewContextMenu())
RadTreeView1.ContextMenus(0).LoadContentFile("~/MyContextMenuContentFile.xml")

The structure of the context menu content file is the same as the structure of the RadMenu content file.

Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy