Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Spanned Cells show not always the data of the first column
Spanned Cells show not always the data of the first column [message #1803965] Thu, 14 March 2019 13:36 Go to next message
Niklas Kellner is currently offline Niklas KellnerFriend
Messages: 5
Registered: March 2019
Junior Member
Hello,

I have a problem with the Spanned Cells in the NatTable.
When I have a cell spanned over multiple columns and the first column, of the cell, is not visible the data of the first visible column is loaded.
This also happens when there are two Viewports and the cell spans over both Viewports.

My understanding of the Spanned Cells feature is that the cell shows always the data of the first column even when it is not visible.
Is my understanding wrong or is there a problem with the implementation?

This problem can be reproduce by changing the CELL_SPAN to 4 in the _5014_SpanningDataLayerExample example.

Regards
Niklas Kellner
Re: Spanned Cells show not always the data of the first column [message #1803976 is a reply to message #1803965] Thu, 14 March 2019 16:26 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2695
Registered: July 2012
Senior Member
Your understanding is not correct. Because of the virtual nature of NatTable the data value of the current visible cell is shown. Otherwise we would need to access a cell outside the viewport. And such a cell access could have negative effects.

Counter question, why is there different data for cells in the same span?
Re: Spanned Cells show not always the data of the first column [message #1803977 is a reply to message #1803976] Thu, 14 March 2019 16:41 Go to previous messageGo to next message
Niklas Kellner is currently offline Niklas KellnerFriend
Messages: 5
Registered: March 2019
Junior Member
Thank you for the reply.

There is different data because I want to have a tree table and the root elements should only have content in the first column, the second column has a checkbox painter which should only be shown for the child elements.

My thought was that when I span a cell over the full width of the table, I could achieve that the full row has the behavior of the first column

Re: Spanned Cells show not always the data of the first column [message #1803982 is a reply to message #1803977] Thu, 14 March 2019 19:21 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2695
Registered: July 2012
Senior Member
If the painter should only be shown for child elements, you probably should modify your cell label provider to respect that rule.
Re: Spanned Cells show not always the data of the first column [message #1804004 is a reply to message #1803982] Fri, 15 March 2019 11:53 Go to previous message
Niklas Kellner is currently offline Niklas KellnerFriend
Messages: 5
Registered: March 2019
Junior Member
Thank you for the tip, i will have a look into that.
Previous Topic:Filter restarting the row numbers from "1"
Next Topic:How to restore a column selection
Goto Forum:
  


Current Time: Wed Jul 17 21:23:06 GMT 2019

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

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

Back to the top