Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Sorting not proper
Sorting not proper [message #1783125] Thu, 08 March 2018 07:15 Go to next message
Gaurav Tripathi is currently offline Gaurav TripathiFriend
Messages: 43
Registered: September 2015

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?

Re: Sorting not proper [message #1783133 is a reply to message #1783125] Thu, 08 March 2018 11:26 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
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: Sun Jun 13 05:39:57 GMT 2021

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

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

Back to the top