Unplanned
Last Updated: 10 Mar 2017 13:22 by ADMIN
ADMIN
Marin Bratanov
Created on: 08 Mar 2017 08:49
Category: Navigation
Type: Bug Report
0
Nodes with Visible=false are rendered
One workaround is to remove nodes that are not visible, e.g., in the Page_Load event:

RadNavigation1.Nodes.RemoveAll(x => !x.Visible);

Another workaround is to remove the HTML of hidden nodes. Note that this will not affect the nodes collections and they will still be present. Invoking operations or methods on such removed nodes can cause errors.

			<telerik:RadNavigation runat="server" ID="RadNavigation1" OnClientLoad="OnClientLoad">
				<Nodes>
					<telerik:NavigationNode Text="first"></telerik:NavigationNode>
					<telerik:NavigationNode Text="second" Visible="false"></telerik:NavigationNode>
					<telerik:NavigationNode Text="third"></telerik:NavigationNode>
				</Nodes>
			</telerik:RadNavigation>
			<script>
				function OnClientLoad(sender, args) {
					var nodes = sender.get_allNodes();
					var indicesToRemove = [];
					for (var i = 0; i < nodes.length; i++) {
						if (nodes[i].get_element().style.display == "none") {
							$telerik.$(nodes[i].get_element()).remove();
						}
					}
				}
			</script>
0 comments