I have the following code that allows me to sort columns in my table in ascending or descending order.
protected void setSortColumn(GridPanelColumn gridPanelColumn, TableColumn column) { table.setRedraw(false); // check if already selected if (sortGridPanelColumn != null && sortGridPanelColumn == gridPanelColumn) { // toggle sort order sortAscending = !sortAscending; } else { // set new sort column sortGridPanelColumn = gridPanelColumn; sortAscending = false; table.setSortColumn(column); } // set sort direction table.setSortDirection(sortAscending ? SWT.UP : SWT.DOWN); // refresh table tableViewer.refresh(); table.setRedraw(true); }
The only problem is that when the user clicks on the column heading to sort, the arrow causes the column name to dodge (for example: Ccy .. ^) instead of (CCy1 Amount). Is there a way to disable the arrow display? I would rather not worry about resizing the columns of the grid just to accommodate the arrows so that the dots do not form.
Any ideas on how to do this?
source share