Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Selected columns indexes in collapsed groups
Selected columns indexes in collapsed groups [message #1033741] Thu, 04 April 2013 15:34 Go to next message
Federico Mising name is currently offline Federico Mising name
Messages: 3
Registered: November 2012
Junior Member
In case of nattable with collapsed column groups, is there a way to get the absolute index of selected columns?

Currently the getSelectedColumnPositions() function returns the column indexes ignoring collapsed columns

e.g:

int[] selectedColumns = gridLayer.getSelectionLayer().getSelectedColumnPositions();

Returns indexes of currently shown columns. I'd need to get indexes considering also collapsed columns.
Re: Selected columns indexes in collapsed groups [message #1033745 is a reply to message #1033741] Thu, 04 April 2013 15:40 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1300
Registered: July 2012
Senior Member
As you can see in the method name you are getting positions and not indeces. See here for the explanation of the difference: http://eclipse.org/nattable/documentation.php?page=layer

Try to call selectionLayer.getColumnIndexByPosition(int) to transform position to index.
Re: Selected columns indexes in collapsed groups [message #1034242 is a reply to message #1033745] Fri, 05 April 2013 07:34 Go to previous message
Federico Mising name is currently offline Federico Mising name
Messages: 3
Registered: November 2012
Junior Member
Thank you, I am now able to get correct values..
Previous Topic:Strange behavior with RowResizeCommand
Next Topic:Sending Events bottom up, over all layers?
Goto Forum:
  


Current Time: Wed Oct 01 08:19:22 GMT 2014

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

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