New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

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.Add(new RadTreeViewContextMenu())

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

In this article