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

NavigationNode Object

The NavigationNode object is returned by the getNode method of the NavigationNodeCollection object. The following table lists the most important methods:

 

NameParametersReturn TypeDescription
get_enablednoneBooleanReturns true if the node is enabled, false if it is disabled.
get_enablednoneBooleanSame as get_isEnabled.
set_enabledBooleannoneSets the enabled state of the node.
focusnonenoneMoves the focus to the node. See Example 1.
blurnonenoneRemoves focus from the node. See Example 2.
get_nodesnoneNodeCollectionGets the child nodes of the current node.
get_nextNodenoneNavigationNodeReturns the next sibling of the node. If the item is last, returns the first node in the NodeCollection.
get_nextSiblingnoneNavigationNodeReturns the next sibling of the item. If the node is last, returns null.
get_previousNodenoneNavigationNodeReturns the previous sibling of the node. If the item is first, returns the last node in the NodeCollection.
get_previousSiblingnoneNavigationNodeReturns the previous sibling of the item. If the node is first, returns null.
get_expandedNodenoneNavigationNodeGets the expanded child node. Null if no child node is expanded.
get_parentnoneRadNavigation or NavigationNodeReturns an instance of the parent object. RadNavigation if this is a root node, NavigationNode if it is a child node.
get_navigationnoneRadNavigationReturns an instance of the RadNavigation that contains the node.
get_indexnoneIntegerGets the zero based index of the node inside the parent NodeCollection.
get_levelnoneIntegerGets the level of the node. Root level nodes are level 0.
expandnonenoneExpands the node and reveals its children, if any.
collapsenonenoneCollapses the node, if it is expanded.
get_visiblenonebooleanReturns true if the node is visible or false if it is invisible.
set_visiblebooleannoneSets the visibility of the node
get_textnonestring textReturns the text of the node.
set_textstring textnoneSets the text of the node.
get_navigateUrlnonenoneReturns the value of the node's navigateURL property. This is the URL of the Web page the node launches on click.
set_navigateUrlstringnoneSets the navigateURL property of the node. This is the URL of the Web page the node launches on click. The navigateUrl property must be an absolute URL on the client side: e.g., http://mydomain.com/default.aspx not default.aspx.
get_imageUrlnone(string imageUrl)Gets the URL of the image.
set_imageUrl(string imageUrl)noneSets the URL of the image.
get_hoveredImageUrlnone(string imageUrl)Gets the URL of the image displayed when the mouse is over the node.
set_hoveredImageUrl(string imageUrl)noneSets the URL of the image displayed when the mouse is over the node.
get_selectedImageUrlnone(string imageURL)Gets the value of the SelectedImageUrl property
set_selectedImageUrlstring (imageUrl)noneSets the URL of the image displayed when the node is selected
get_elementnoneHTML ElementGets the root DOM element of the node (LI).
get_linkElementnoneHTML ElementGets the anchor DOM element of the node (a).
get_imageElementnoneHTML ElementGets the image DOM element of the node. If the server side ImageUrl property is not set,returns undefined.
get_textElementnoneHTML ElementGets the DOM element of the node text (span).
get_childListElementnoneHTML ElementGets the DOM element of the list of child nodes (UL).
get_selectednoneBooleanReturns whether the node is selected
set_selectedBooleannoneSets the selected property of the node.

Example 1: Focus a node.

JavaScript
var nav = $find("<%= RadNavigation1.ClientID %>");
var node = nav.findNodeByText("Products");
node.focus();	

Example 2: Blur a node.

JavaScript
var nav = $find("<%= RadNavigation1.ClientID %>");
var node = nav.findNodeByText("Products");
node.blur();

See Also

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