New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

TemplateNeeded

Occurs before template is being applied to the navigation node.

The TemplateNeeded event handler receives two arguments:

  1. The Navigation that is loading the nodes. This argument is of type object, but can be cast to the RadNavigation type.

  2. An EventArgs object. This object has an Node property, which provides access to the node that expects receive a template. This node, in turn, has a NodeTemplate property, which has to be set.

ASPNET
<telerik:RadNavigation runat="server" ID="RadNavigation2" DataFieldID="id"  DataKeyNames="Text" DataFieldParentID="parentID" 
DataTextField="Text" OnTemplateNeeded="RadNavigation_TemplateNeeded">
</telerik:RadNavigation>
C#
protected void RadNavigation1_TemplateNeeded(object sender, NavigationNodeEventArguments e)
{
	e.Node.NodeTemplate = new LabelDataBoundTemplate();
}

See Also

In this article
See Also
Not finding the help you need?
Contact Support