Column ordering changes gets restored when refreshing datasource

Hi,

I have set the columnReordingAllowed = true in a table.

After reording the column in the UI, if I refresh my datasource by table.setContainerDataSource(data) then the reordered column gets back to the original position.

How can I prevent this ?

Thanks in advance.

Regards,
Aftab

Hi,

I guess something like

Object[] visibleColumns = table.getVisibleColumns(); table.setContainerDataSource(data); table.setVisibleColumns(visibleColumns); should do the trick.

Best Regards,
Marc

Thanks, it worked !

  • Aftab