Hi guys, hopefully this is an easy one.
I am performing 'lazy loading' on my tree view control, so only the highest level nodes are loaded at any given time. However, we may already have a selected node somewhere deep in the tree when our page loads, so I want to go ahead and select it for the user programmatically. The following code does just that but throws exceptions when there are '/' characters in some of the nodes display values.
So the question is, how can I change my ValuePathSeparator, or perform this same functionality without using it.
Thanks for your time.
I am performing 'lazy loading' on my tree view control, so only the highest level nodes are loaded at any given time. However, we may already have a selected node somewhere deep in the tree when our page loads, so I want to go ahead and select it for the user programmatically. The following code does just that but throws exceptions when there are '/' characters in some of the nodes display values.
| private void OpenTreeToNode(string nodeValue) |
| { |
| if (nodeValue.Length > 0) |
| { |
| FacilityBE facility = new FacilityBE(int.Parse(nodeValue)); |
| string valuePath = ""; |
| List<FacilityBE> ancestorFacilities = facility.GetAncestors(true); |
| foreach (FacilityBE ancestorFacility in ancestorFacilities) |
| { |
| if (ancestorFacility != ancestorFacilities[0]) |
| { |
| valuePath += "/"; |
| } |
| valuePath += ancestorFacility.ID.ToString(); |
| RadTreeNode node = Tree.FindNodeByValue(ancestorFacility.ID.ToString()); |
| node.Expanded = true; |
| this.FillChildNodes(node); |
| } |
| Tree.FindNodeByValue(nodeValue).Selected = true; |
| } |
| } |
So the question is, how can I change my ValuePathSeparator, or perform this same functionality without using it.
Thanks for your time.