Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Alternating Row Configuration (Even Odd Row Color )
Alternating Row Configuration [message #1698420] Mon, 15 June 2015 13:15 Go to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member
Hi,

I am using white and grey for even and odd rows. But when I scroll row colors are not maintained i.e. suppose row 0 is white, 1 is grey and so on. Now when I scroll down row 1 becomes row 0 and it changes the color to white. But ideally it should retain its original color grey irrespective of its current position.

Please help!
Re: Alternating Row Configuration [message #1698421 is a reply to message #1698420] Mon, 15 June 2015 13:21 Go to previous messageGo to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member
AlternatingRowConfigLabelAccumulator is using row positions maybe because of that???
Re: Alternating Row Configuration [message #1698423 is a reply to message #1698421] Mon, 15 June 2015 13:48 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Yes it is because of the row position, because the row position changes because of the ViewportLayer.

Which version of NatTable? In my code base I can see that if the AlternatingRowConfigLabelAccumulator is created with a layer parameter, the row position is translated to the row index. The DefaultGridLayerConfiguration is doing that. So either you have an older version of NatTable or you are using custom configuration where the AlternatingRowConfigLabelAccumulator is created using the empty default constructor instead of the parameterized constructor.
Re: Alternating Row Configuration [message #1698502 is a reply to message #1698423] Tue, 16 June 2015 06:48 Go to previous messageGo to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member
I am using NatTable core 1.2.0
Re: Alternating Row Configuration [message #1698517 is a reply to message #1698502] Tue, 16 June 2015 08:09 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
It was fixed with 1.1.0.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=432127

You need to check that your AlternatingRowConfigLabelAccumulator is created with the ILayer reference to the body layer. And you need to ensure that the layers are set to the GridLayer before the configurations are added.
Re: Alternating Row Configuration [message #1698814 is a reply to message #1698517] Thu, 18 June 2015 07:03 Go to previous messageGo to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member
Thank u so much. Let me try creating AlternatingRowConfigLabelAccumulator with body layer
Re: Alternating Row Configuration [message #1699163 is a reply to message #1698814] Mon, 22 June 2015 09:02 Go to previous message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member

Awesome! Got it fixed Smile

Thanks a lot Dirk..
Previous Topic:SpanningDataLayer paint problems when scrolling fast
Next Topic:I can't get Nattable working
Goto Forum:
  


Current Time: Fri Mar 29 05:14:59 GMT 2024

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

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

Back to the top