Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Row height based on position, Instead of Index
Row height based on position, Instead of Index [message #1755060] Mon, 27 February 2017 16:46 Go to next message
Naveen Sabapathy is currently offline Naveen SabapathyFriend
Messages: 46
Registered: July 2016
Need a small clarification,

In Naatable, the height of the row is maintained based on row position not based on row index. (i.e) If I do the resize of the 1st row and If I apply sort / filter operation. Consider the from 1st Index row changes to 5th position. The 1st row shows the modified heigt. The 5th row position(1st row Index) shows the default row height.

If I want to maintain the row height by Index. Any other configuration method is available. Or While any update in the row position happening, Do we need to explicitly maintain the row position by
bodyDatalayer.setRowHeightByPosition(rowPosition, height);
Re: Row height based on position, Instead of Index [message #1755099 is a reply to message #1755060] Tue, 28 February 2017 07:51 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2775
Registered: July 2012
Senior Member
Your observation is correct, but the assumption is incorrect. The row size is maintained by row index, as it is stored on the DataLayer. By applying a sort or filter operation, you are changing the order of the items in the collection. Considering your example, you resized row 1. So the SizeConfig stores the changed row size for row index 0. Now you apply sorting, which actually changes the indexes of the elements in the collection, e.g. the element in row 1 is now in row 5. The SizeConfig doesn't know that. There is no mapping between the element and the index.

I don't have a quick solution on how to introduce such a mapping. It would somehow mean to attach the SizeConfig to the base collection while the DataLayer needs to operate on the top-most GlazedLists instance.
Previous Topic:How to not render grid lines around between cells via CSS
Next Topic:How to use a filter on a NatTable without headers (neither column nor row)
Goto Forum:

Current Time: Thu Feb 20 10:19:27 GMT 2020

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

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

Back to the top