Skip to main content



      Home
Home » Eclipse Projects » NatTable » Sorting not proper
Sorting not proper [message #1783125] Thu, 08 March 2018 02:15 Go to next message
Eclipse UserFriend
Hi,

In NatTable, I have the column which contains a string like String1, String2, String3, String10, String100.
I have used GlazedListsSortModel within my SortHeaderLayer and added SingleClickSortConfiguration.

So when I click on this header it is sorting like below:

For example String1, String3, String2, String100, String10

After sorting it is showing like this :
String1, String10, String100, String2, String3 instead of
String1, String2, String3, String10, String100.

I am not able to catch why so happening?
Is there any solution for same?

Thanks
Re: Sorting not proper [message #1783133 is a reply to message #1783125] Thu, 08 March 2018 06:26 Go to previous message
Eclipse UserFriend
That is the sorting that is done by simply comparing the strings. And this is done by the DefaultComparator we configure by default. If you want a different sorting you need to implement and register a custom comparator.
Previous Topic:Cell painting with Combination of images
Next Topic:Custom persistence behavior and modifying the PersistenceDialog
Goto Forum:
  


Current Time: Mon Jul 07 17:47:28 EDT 2025

Powered by FUDForum. Page generated in 0.06597 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top