Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Sorting and Indices
Sorting and Indices [message #1397922] Thu, 10 July 2014 06:54 Go to next message
Ludwig Moser is currently offline Ludwig Moser
Messages: 319
Registered: July 2009
Senior Member
I got a Datamodel which has elements in a List, lets call it input.
and nattable rendering the input.
my table is configured to feature sorting.

i have a shortcut set which selects the previous and next item.
but as the list is sorted different in the table than it is in my input the results are not as desired.

how can i get the sort order of the items in the list of nattable?

1) is there already a method for it (iff so i did not stumble upon it)
2) if not how can i achieve this?
Re: Sorting and Indices [message #1397932 is a reply to message #1397922] Thu, 10 July 2014 07:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1205
Registered: July 2012
Senior Member
well, which kind of sorting are you using? GlazedLists or simple sorting?

Using GlazedList I think you need to check the transformation within the SortedList and the underlying list.
Re: Sorting and Indices [message #1397933 is a reply to message #1397932] Thu, 10 July 2014 07:09 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig Moser
Messages: 319
Registered: July 2009
Senior Member
i am using glazedlists.
so i need to add a listener directly to the list.
i thought there might be a point when the user clicks the header.

thanks for a rapid reply this helps!
Re: Sorting and Indices [message #1397946 is a reply to message #1397933] Thu, 10 July 2014 07:32 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1205
Registered: July 2012
Senior Member
when the user clicks the header the SortedList gets sorted. This means there is a transformation that happens in the SortedList. As typically you will use the SortedList as input, NatTable only knows that list and therefore nothing about the transformation that happened underlying.
Previous Topic:Discussion: NatTable Roadmap
Next Topic:Selecting specific row by row number
Goto Forum:
  


Current Time: Wed Jul 23 01:51:39 EDT 2014

Powered by FUDForum. Page generated in 0.01769 seconds