/** * Performs post-handling of the given grid. If the query has the single * indicator as data filter item, the column at the data dimension index is * removed. If the query has sorting order, then the grid is ordered on the * value column based on the sorting specified. * * @param params the {@link DataQueryParams}. * @param grid the grid. */ private void postHandleGrid( DataQueryParams params, Grid grid ) { if ( params.hasProcessingHint( ProcessingHint.SINGLE_INDICATOR_REPORTING_RATE_FILTER_ITEM ) ) { grid.removeColumn( DataQueryParams.DX_INDEX ); } if ( params.hasOrder() && grid.getIndexOfHeader( VALUE_ID ) >= 0 ) { int orderInt = params.getOrder().equals( SortOrder.ASC ) ? -1 : 1; grid.sortGrid( grid.getIndexOfHeader( VALUE_ID ) + 1, orderInt ); } }
grid.sortGrid( grid.getWidth(), sortOrder );
grid.sortGrid( 1, params.getSortOrderAsInt() );