Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Column and Row Index Issue(I am creating Nat table with GlazedList for Sorting. I need to get the row index of the selected data with respect to original table without sorting.)
Column and Row Index Issue [message #1229867] Fri, 10 January 2014 06:58 Go to next message
Arul prakash is currently offline Arul prakash
Messages: 1
Registered: December 2013
Junior Member
I am creating Nat table with GlazedList for Sorting. I need to get the row index of the selected data with respect to original table without sorting. How can i get that row index. Even i tried to get the row index of the Data Layer using LayerUtil and LayerCommandUtil . It is also returning the row index based on sorting only. Will i be able to do that or i should change my approach?
Re: Column and Row Index Issue [message #1229920 is a reply to message #1229867] Fri, 10 January 2014 09:49 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1066
Registered: July 2012
Senior Member
You need to get familiar with GlazedLists. Because usually you are building your DataLayer on top of the SortedList. At least this is how it is intended.

Now the SortedList is a transformed view over the original list. That means every action you are trying to perform agains NatTable layers will return the indexes of the SortedList. If you need the index of the element in the original list, you need to operate against the base list. But NatTable can not help with that.

What do you need the original index for? I can see no reason for this, as you could simply operate on the SortedList as you would do on the original list. The SortedList will transport any list operation with the correct indexes down to the original list.
Previous Topic:Exception when nattable in dialog
Next Topic:Mixing Sort by and Filter in nattable
Goto Forum:
  


Current Time: Wed Apr 16 06:45:59 EDT 2014

Powered by FUDForum. Page generated in 0.05573 seconds