Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Row spanning not working when table is scrolled(Row span displays as individual row when nattable is scrolled)
Row spanning not working when table is scrolled [message #1829228] Mon, 29 June 2020 08:50 Go to next message
Shreya Suman is currently offline Shreya SumanFriend
Messages: 13
Registered: March 2017
Junior Member
Hello,

in one of my nattable , i have implemented row spanning by overridding the getCellByPosition method of GlazedListDataprovider. it works fine but only when i am scrolling the table rows and if first row of the spanned rows moves out of the visible table area, the spanning does not work and instead it displays as individual rows.

please see attached document for the images.

Can anyone help me how to configure my table such that spanning for rows always work correctly.
Re: Row spanning not working when table is scrolled [message #1829232 is a reply to message #1829228] Mon, 29 June 2020 10:37 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
Then your implementation of getCellByPosition() is incorrect! BTW, the deprecated GlazedListsDataProvider does not specify the getCellByPosition() method, as it does not implement the ISpanningDataProvider interface. Not sure about which classses you are talking about.

Typically the issue is that you either put the layers incorrectly together which causes a index-position-transformation that should not happen on the DataLayer, or you missed to check for the correct starting row of your spanning on scrolling.

By giving me that little information (and probably incorrect information) I am unable to help.
Re: Row spanning not working when table is scrolled [message #1830044 is a reply to message #1829232] Thu, 16 July 2020 08:46 Go to previous messageGo to next message
Shreya Suman is currently offline Shreya SumanFriend
Messages: 13
Registered: March 2017
Junior Member
Hello Dirk,

i have a custom Glazed list data provider (MyGlazedListDataProvider) that extends GlazedListDataProvider and implements ISpanningDataProvider
My Body Data layer is an instance of SpanningDataLayer.

i have done casting for body data provider when i instatiate bodydatalayer as shown below.
bodyDataProvider = MyGlazedListDataProvider(...);
bodyDataLayer = new SpanningDataLayer((ISpanningDataProvider)bodyDataProvider);

since my MyGlazedListDataProvider implements ISpanningDataProvider, i was able to override its getCellByPosition method.

Can you tell me where i am going wrong and what is the correct way to achieve row spanning without facing the issue while scrolling.

Thanks
Re: Row spanning not working when table is scrolled [message #1830048 is a reply to message #1830044] Thu, 16 July 2020 09:42 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 30
Registered: March 2020
Member
How should I be able to tell you what you are doing wrong without seeing the code that you used to calculate the spanning? From my experience people are doing things wrong in this method for identifying the origin row position and the spanning. But hard to tell if you made such a mistake or anything else is wrong.
Previous Topic:summary row
Next Topic:FormText in Cell
Goto Forum:
  


Current Time: Tue Jun 15 20:38:46 GMT 2021

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

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

Back to the top