New to Telerik UI for ASP.NET AJAXStart a 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:

C#
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.

Not finding the help you need?
Contact Support