Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Reordering columns of a table
i want to reoder the columns of a table, i didn't get the example in the samples. I am new to vaadin, and my knowledge in UI is not that good. For example,there are many listeners and i don't know which to add. Also the table is a serizalizable object so i want a way to save the board with its new order of columns.
Plz veryyyyyyyy simple replies
Hi,
I'm not sure what you want to accomplish, but you can set the order of visible columns in a Table by using the setVisibleColumns method:
table.setVisibleColumns(new Object[] {"propertyId2", "propertyId1", "propertyId3"});
-Henri
i want to swap two columns of a table using drag and drop
Use the method setColumnReorderingAllowed. You can also check out the relevant example in the sampler: http://demo.vaadin.com/sampler/#TableColumnReordering
rana badr osman: but i didn't get the part of the listener
thnx
Please try to search the forum, there have been exactly the same questions (how to save the order of columns etc.) before, and they've been answered as far as I remember.