Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Structural Refresh does not keep Column Order(Structural Refresh does not keep Column Order)
Structural Refresh does not keep Column Order [message #1197222] Tue, 19 November 2013 20:22 Go to next message
Arjan Kok is currently offline Arjan KokFriend
Messages: 36
Registered: July 2009
Member
Hi,

When running a structural refresh command e.g.

natTable.doCommand(new StructuralRefreshCommand());

then the Nattable resets the Column Order.

Is there a way to workaround this?

Kind Regards,

Arjan Kok
Re: Structural Refresh does not keep Column Order [message #1197312 is a reply to message #1197222] Tue, 19 November 2013 21:22 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
Quote:
Is there a way to workaround this?


Don't use the StructuralRefreshCommand! That's the only "workaround". A structural refresh cleans everything and refreshes the state.

You might want to try to execute a VisualRefreshCommand which will not reset layer states. Maybe that fits your needs.
Re: Structural Refresh does not keep Column Order [message #1199460 is a reply to message #1197312] Wed, 20 November 2013 21:29 Go to previous messageGo to next message
Arjan Kok is currently offline Arjan KokFriend
Messages: 36
Registered: July 2009
Member
Ok, Thanks.

Note that a StructuralRefresh does not unhide a hidden Column, which seems a bit inconsistent.

What is the difference between VisualRefreshCommand and StructuralRefreshCommand?

Regards, Arjan.
Re: Structural Refresh does not keep Column Order [message #1200568 is a reply to message #1199460] Thu, 21 November 2013 09:54 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
Quote:
Note that a StructuralRefresh does not unhide a hidden Column, which seems a bit inconsistent.


I can look at this too and add it, which could make sense in context.

Quote:
What is the difference between VisualRefreshCommand and StructuralRefreshCommand?


Structural changes are changes to the structure (as you should guess from the name). This means the underlying data has changed, like removing/adding rows/columns and so on. Usually the StructuralRefreshCommand is used in conjunction with dynamic data models that change the whole structure.

Visual changes are changes that just impact the rendering by keeping the structure. Like updating values in the model, changing painters or styles and so on.

That said IMHO it would be correct to also reset the hide/show values completely on StructuralRefreshCommand. Will check back on that. Thanks for reporting.
Re: Structural Refresh does not keep Column Order [message #1200649 is a reply to message #1200568] Thu, 21 November 2013 10:41 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
Regarding StructuralRefreshCommand and hidden columns, it seems that simply changing this causes other issues. So I'll leave it as it is for now. But we will consider this for sure in the next architecture where we are planning to refactor the whole event mechanism.
Previous Topic:SetText in Corner
Next Topic:programmatically resize column
Goto Forum:
  


Current Time: Sat Nov 18 02:58:30 GMT 2017

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

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