Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Issue with ColumnReorder and Refresh
Issue with ColumnReorder and Refresh [message #1224793] Fri, 27 December 2013 20:14 Go to next message
Testr t is currently offline Testr tFriend
Messages: 93
Registered: April 2013
Member
Hi,

I am using Nattable in my eclipse plugin application. I have the column reorder layer setup for my grid so that column reordering is supported and it works fine. But whenever i call refresh on the grid, the column reorder is lost and it defaults to the original state. Is there any way to preserver the column reorder state even after the grid refresh(nattable.refresh()) call? The reason I am calling refresh method is i do some operations on the grid based on context menu options and the grid data changes(backed by data provider and not Glazedlist) and have to refresh the contents.
Re: Issue with ColumnReorder and Refresh [message #1225584 is a reply to message #1224793] Mon, 30 December 2013 07:51 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
NatTable.refresh() executes a structural refresh command. This resets the column reorder state because the column structure mit ht have been changed. If you only changed data but didn't add or remove data you should execute a VisualRefreshCommand to perform an update.
Re: Issue with ColumnReorder and Refresh [message #1225678 is a reply to message #1225584] Mon, 30 December 2013 13:40 Go to previous messageGo to next message
Testr t is currently offline Testr tFriend
Messages: 93
Registered: April 2013
Member
Thanks Dirk, for some scenarios i could use the VisualRefreshCommand. But for the case where I am adding new columns, I have to call the refresh command as there is a structural change and I have to call refresh to see the newly added column(otherwise i do not see the newly added column). So now every time I add a new column, I loose the reordered column states. Is there anyway to workaround this?
Re: Issue with ColumnReorder and Refresh [message #1225723 is a reply to message #1225678] Mon, 30 December 2013 15:40 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
You could try to fire the corresponding event telling which columns have changed. I would need to check the details myself, but I'm on vacation at the moment.
Previous Topic:Refreshing NatTable
Next Topic:when scroling horizontally, nattable filter stop working
Goto Forum:
  


Current Time: Thu Apr 25 00:00:55 GMT 2024

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

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

Back to the top