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
Thanks so much. Exactly what I need.
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
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
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.
The UltraNavigationBar.NavigateTo method parses the path and sets the SelectedLocation property to the resulting location. Note that each location in the path has to have already been created; I'm not sure if that was part of the question, but locations are never created automatically as there is no connect between the control and (for example) a file system.