Grid reordered values


I have an application that uses the Grid and has the setColumnReorderingAllowed() set as true. The drag and drop reordering works fine but I would like to be able to persist the changed values to a database. Unfortunately, I cannot find a way to access the reordered values of the Grid… I’ve tried adding a ColumnReorderHandler but it’s not recognised.

Does anybody have an idea of how to do this?


Following code works for me:

grid.addColumnReorderListener((event) -> { if (!event.isUserOriginated()) { return; } Object arr = getVisibleColumns(); config.setColOrder(arr);"column reorder event");; }); and:

    public Object getVisibleColumns() {
        List<Column> columns = grid.getColumns();
        Object ids = new Object[columns.size()]
        for (int i = 0; i < ids.length + 1; i++) {
 = columns.get(i).getPropertyId();
        return ids;