How to save Column order and width after changing their position and size ?
Q1. How can I get the column width of the nattable after changing the width by dragging/double click event ?
- I want this with original column position even after the column is not in the original order.
Q2. How can I get the column order, after re-order using drag and drop?
Answer to Q1:
Ask the layers, they have getWidth()
and getColumnWidthByPosition(int)
methods
Answer to Q2:
Typically you will need to check the ColumnReorderLayer
directly.
But if you want to store and load NatTable states, you should have a look at the persistence mechanism provided by NatTable. I wrote an article about this and it is even documented on the NatTable website.