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


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.

<telerik:RadNavigation runat="server" ID="RadNavigation2" DataFieldID="id"  DataKeyNames="Text" DataFieldParentID="parentID" 
DataTextField="Text" OnTemplateNeeded="RadNavigation_TemplateNeeded">
protected void RadNavigation1_TemplateNeeded(object sender, NavigationNodeEventArguments e)
    e.Node.NodeTemplate = new LabelDataBoundTemplate();
Protected Sub RadNavigation1_TemplateNeeded(sender As Object, e As NavigationNodeEventArguments)
    e.Node.NodeTemplate = New LabelDataBoundTemplate()
End Sub

See Also

In this article
Not finding the help you need? Improve this article