Example usage for com.vaadin.ui Grid setColumnOrder

List of usage examples for com.vaadin.ui Grid setColumnOrder

Introduction

In this page you can find the example usage for com.vaadin.ui Grid setColumnOrder.

Prototype

public void setColumnOrder(String... columnIds) 

Source Link

Document

Sets a new column order for the grid based on their column ids.

Usage

From source file:com.hack23.cia.web.impl.ui.application.views.common.gridfactory.impl.GridFactoryImpl.java

License:Apache License

/**
 * Configure column orders and hidden fields.
 *
 * @param columnOrder/*  w ww .j  a v a 2  s  .  c o  m*/
 *            the column order
 * @param hideColumns
 *            the hide columns
 * @param grid
 *            the grid
 */
private static void configureColumnOrdersAndHiddenFields(final Object[] columnOrder, final Object[] hideColumns,
        final Grid grid) {
    if (columnOrder != null) {
        grid.setColumnOrder(columnOrder);
    }

    if (hideColumns != null) {
        for (final Object o : hideColumns) {
            grid.removeColumn(o);
        }
    }
}