Hi
I wish to set the RootLocation item's Text property to a folder which is not at the top of a hierarchy.
E.g.
UltraNavigationBarLocation rootLocation = navBar.RootLocation;
rootLocation.Text = @"C:\MyApp\Workspace";
The problem is that I get an exception due to path separators within the string.
I'm sure it's something trivial, but I can't find anything in the documentation regarding this.
Thanks David
As a general rule, you cannot assign a value to the Text property that contains the path separator, since the path parsing logic would not be able to identify locations from a string.
I might be speculating a bit here, but it looks like you are trying to change the root location while keeping the contents of the respective Locations collections the same, which is not supported. Once the Locations collections are populated, you cannot redefine the root location. Going by your example, instead of populating from the root drive, i.e., "C:", you would have to assign the "C:\MyApp\Workspace" folder to the RootLocation property, and populate from there. If I am misinterpreting this, please repost and clarify exactly what you are trying to accomplish and we will try to help.
Hi, I have a similar issue. I need to start populating starting from a path, for example "C:\Program Files\Infragistics" as the root location. I got an exception when I assign the path to RootLocation property: "An UltraNavigationBarLocation cannot contain the PathSeparator in any part of the text which is used to identify it when parsing a navigation path."
Could you give me a code sample how you do it? Many thanks.
Brian Fallon"] Going by your example, instead of populating from the root drive, i.e., "C:", you would have to assign the "C:\MyApp\Workspace" folder to the RootLocation property, and populate from there. If I am misinterpreting this, please repost and clarify exactly what you are trying to accomplish and we will try to help.
Going by your example, instead of populating from the root drive, i.e., "C:", you would have to assign the "C:\MyApp\Workspace" folder to the RootLocation property, and populate from there. If I am misinterpreting this, please repost and clarify exactly what you are trying to accomplish and we will try to help.
Hello
I worked around the exception that was thrown by caching the root path, in your example, "C:\Program Files\", and setting the RootLocation property to "Infragistics". The navigation is then relative to the root path.
When you navigate to a new location, remove the cached root from the NavigateTo method:-
navBar.NavigateTo(absolutePath.Substring(RootPath.Length), true);
When you wish to get a location from the NavigationBar:-
UltraNavigationBarLocation location = navBar.FromFullPath(path.Substring(RootPath.Length));
This may not be the best solution, but it works with only minor changes and was sufficient for my requirements.
Regards
David
I'm not clear on how you were able to set the RootLocation property, since it is read-only.
Regarding the post of Feb. 5, see attached sample
Thanks so much. Exactly what I need.