Nebula NatTable Integer column Sorting [message #1852071] |
Thu, 28 April 2022 06:54  |
Eclipse User |
|
|
|
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10071 seconds