I tried to add some locations to a root location using fake data code (the labels have been set to only one letter to paste the code) :
foreach (UltraNavigationBarLocation location in rootLocation.Locations) { location.Locations.Add("10", "A"); location.Locations.Add("20", "B"); location.Locations.Add("30", "R"); location.Locations.Add("40", "I"); location.Locations.Add("50", "J"); location.Locations.Add("60", "N"); location.Locations.Add("70", "C"); }
Problem is that the locations added doesn't respect the KEY order but the labels' alphabetical order. So the display order wanted is not respected : Instead of ABRIJNC, I got ABCIJNR.
How can I fix this ?
Thanks in advance !
Hello YannickBiet,
I am glad to hear that the custom 'IComparer<UltraNavigationLocation>' helped you.
I believe that many sort comparers could be made in order for a developer to achieve some behaviors. So, we provide the following comparison options: 'Ascending', 'Descending' and 'None'. Other sortings could be achieved with an approach like the one I am using in the sample attached in my second post.
Please feel free to let me know if you need additional assistance.
Boris, you're the man of the day !
Thanks a lot for your support, don't you think you should offer this as default feature for next releases ? (maybe defining your own SortOrder for ultranavigation bar ?)
Anyway, thanks again for this good work!
I have attached a sample in this post demonstrating the desired behavior.
Please take a look at it and let me know if you need additional assistance.
I have created the following case for you: “CAS-72345-CBWD7Q”.
I will provide you further details regarding the desired behavior through your case.
Please feel free to let me know if you need any assistance or if you have any other questions.