Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Flip row and column
Flip row and column [message #1414905] Mon, 01 September 2014 15:18 Go to next message
Martin Mumu is currently offline Martin MumuFriend
Messages: 2
Registered: September 2014
Junior Member
Hi guys,

I'm currently checking if NatTable would be suitable for one of my projects. But I want the "numbers" on top and the headers on the left. In excel this is called transpose (I think).

I checked through all of the examples and non of them implements that. Also DefaultRowHeaderDataProvider only accepts a IDataProvider and not the possibility to add the "propertyStrings". Can I somehow switch the rows and columns using a layer or is this not possible?

Thanks in advance!

-Martin
Re: Flip row and column [message #1414968 is a reply to message #1414905] Mon, 01 September 2014 18:53 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2614
Registered: July 2012
Senior Member
We do not have the functionality to automatically invert the axis. But if it is only about showing numbers in the column header and strings in the row header, you could simply implement a custom IDataProvider
Re: Flip row and column [message #1415241 is a reply to message #1414968] Tue, 02 September 2014 11:50 Go to previous messageGo to next message
Martin Mumu is currently offline Martin MumuFriend
Messages: 2
Registered: September 2014
Junior Member
Allright I got it sort of working using my own RowHeaderDataProvider and a custom GridLayer. But do I see it correct that I would need to rewrite most of the functionality like ListDataProvider, filters, sorting etc. to really get a "horizontal" table instead of a "vertical" table? Or do you have any tips to achieve this pretty easy?

[Updated on: Tue, 02 September 2014 12:00]

Report message to a moderator

Re: Flip row and column [message #1415259 is a reply to message #1415241] Tue, 02 September 2014 12:32 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2614
Registered: July 2012
Senior Member
Quote:
Or do you have any tips to achieve this pretty easy?


Unfortunately not. As I said before, we started working on such an inverted table (or transposed), but failed with the several reasons. This is one of the reasons why we started thinking about a new architecture that is more related to axis than columns and rows. But the community seems to prioritize other things higher, so the completely new architecture is moved in favor of smaller improvements to achieve the new architecture step by step.

Sorry, I got off course. No there is no pretty easy solution and I even think a complete transposed matrix with all possible functionalities is quite hard to implement.
Re: Flip row and column [message #1751146 is a reply to message #1415259] Wed, 04 January 2017 23:03 Go to previous messageGo to next message
Stephan Druskat is currently offline Stephan DruskatFriend
Messages: 102
Registered: October 2011
Location: Berlin, Germany
Senior Member

Dear Dirk, dear forum,

Is the described status still state of the art? Or is there now a way to transpose tables?

Thanks!
Stephan
Re: Flip row and column [message #1751153 is a reply to message #1751146] Thu, 05 January 2017 04:55 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2614
Registered: July 2012
Senior Member
Not sure if it is "state of the art", but there were no actions in that direction.

I know that the Papyrus project implemented such a feature in their context. But it is not trivial afaik and quite special to their data model.
Re: Flip row and column [message #1751162 is a reply to message #1751153] Thu, 05 January 2017 08:11 Go to previous message
Stephan Druskat is currently offline Stephan DruskatFriend
Messages: 102
Registered: October 2011
Location: Berlin, Germany
Senior Member

Thanks!

[EDIT] I've managed to create a simple version of a table that has items in (say) one row rather than one column, by basically overriding ListDataProvider and swapping row and column information.

[Updated on: Thu, 05 January 2017 09:06]

Report message to a moderator

Previous Topic:[NatTable]how to add icon in each column header?
Next Topic:NatTable a suitable widget for my application?
Goto Forum:
  


Current Time: Sun Sep 23 18:20:00 GMT 2018

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

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

Back to the top