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.
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.
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?