I have an odd problem that I hope someone can explain or offer a way in which to correct it.
I have a listbox control that stores the results of a search in an ascending order. As the listbox is populated, I am also creating an array that is populated with similar data. However, the sort order between the 2 differs when the text includes whitespace.
For example, my listbox would appear as follows:
AS400-06SBY
AS400-08SBY
AS400-10
AS400-8
AS400-Australia
AS400-Chester
AS400-Syracuse
AS400 Canada Dev
AS400 Canada Prod
However, my array would sort with the last 2 entries at the top. I even tried to to replace the array with a ListView control but have the same results as the array.
Since the hyphen is ASCII 45 and the whitespace is ASCII 32, I am unclear as to why the sort of my listbox would be incorrect. All sorting is handled by each control's SORT method and each control is updated once the search is completed.
Thanks for any help....
I have a listbox control that stores the results of a search in an ascending order. As the listbox is populated, I am also creating an array that is populated with similar data. However, the sort order between the 2 differs when the text includes whitespace.
For example, my listbox would appear as follows:
AS400-06SBY
AS400-08SBY
AS400-10
AS400-8
AS400-Australia
AS400-Chester
AS400-Syracuse
AS400 Canada Dev
AS400 Canada Prod
However, my array would sort with the last 2 entries at the top. I even tried to to replace the array with a ListView control but have the same results as the array.
Since the hyphen is ASCII 45 and the whitespace is ASCII 32, I am unclear as to why the sort of my listbox would be incorrect. All sorting is handled by each control's SORT method and each control is updated once the search is completed.
Thanks for any help....