Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
675
UltraNavigationBar display text
posted

In working with the Navigation Bar, I found that the locations at each level are sorted by the Key values.  In order to get the order that I want, I had to set those Key values to numeric display order values, while setting the Display Text to the string that I want the user to see.

Now, when the user edits the location or selects the recent locations dropdown list, all the locations display the Key value which means nothing to the user.

Is there a setting to have the control use Display Text when the user is editing the location or selecting from the dropdown?

I have tried a sample I found that used ultraNavigationBar.CreationFilter and tested for a parent of type LocationListItemUIElement, but that trial didn't work because the parent was never of that type.

 Gerry

Parents
  • 69832
    Offline posted

    The short answer to your question is no, you cannot make the control use DisplayText when in edit mode. It sounds like the root of your problem is that you cannot get the locations sorted the way you like. You might want to try handling the LocationExpanding event, and using the Sort method exposed by the e.Location.Locations.VisibleMembers collection. One of the overloads takes an IComparer<UltraNavigationBarLocation> implementation; you should be able to easily implement this to control the order in which the locations appear in the list, while not having to worry about setting the text so as to get the sort order the way you want it. If this does not help, please repost with some additional details and we can try to help.

Reply Children
No Data