Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Nebula NatTable Integer column Sorting(Registering custom comparator for integer column sorting does not work)
Nebula NatTable Integer column Sorting [message #1852071] Thu, 28 April 2022 10:54 Go to next message
Tejamurthy Shivakumar is currently offline Tejamurthy ShivakumarFriend
Messages: 9
Registered: April 2022
Junior Member
Hello all,

I am trying to sort a column in the NatTable which has numeric values. Since the default data type for column values is String, default sorting happens in this column by string comparison. To make this column sorted by numeric values i registered custom comparator like this:

configRegistry.registerConfigAttribute(SortConfigAttributes.SORT_COMPARATOR, new MyCustomComparator(), DisplayMode.NORMAL, ColumnLabelAccumulator.COLUMN_LABEL_PREFIX + intColIndex);

MyCustomComparator implements comparator using integer comparison

This registration of comparator does not do anything and the column sorts on string comparison instead of integer comparison.

Is there anything else i should do?
Any help, will be greatly appreciated.

Thanks in Advance

Regards
Teja
Re: Nebula NatTable Integer column Sorting [message #1852087 is a reply to message #1852071] Thu, 28 April 2022 16:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
It's better to ask here:

https://www.eclipse.org/forums/index.php?t=thread&frm_id=240


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Nebula NatTable Integer column Sorting [message #1852097 is a reply to message #1852087] Fri, 29 April 2022 04:11 Go to previous message
Tejamurthy Shivakumar is currently offline Tejamurthy ShivakumarFriend
Messages: 9
Registered: April 2022
Junior Member
Thanks for the info Ed Merks!
Previous Topic:Jersey BodyPartEntity issue
Next Topic:Client <unknown> disconnected: Unknown error.
Goto Forum:
  


Current Time: Thu Mar 28 17:20:25 GMT 2024

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

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

Back to the top