private void doSort() { getColumnByIndex(sortColumn).sort(); }
/** * Transitions the sort order to the next state (depending on the setting of the sort toggle) * and performs the sort. */ public void toggleSort() { int i = sortOrder.ordinal() + 1; int max = sortToggle == SortToggle.TRISTATE ? 3 : 2; setSortOrder(SortOrder.values()[i >= max ? 0 : i]); sort(); }
grid.getColumns().getChild(Column.class).sort();
/** * Sets the sort column state. If set to true, the column is sorted and designated as the * current sort column. * * @param sortColumn If true, this column is sorted and designated as the current sort column. * @param notifyParent If true, update the sort column property of the parent. */ protected void _setSortColumn(boolean sortColumn, boolean notifyParent) { if (propertyChange("sortColumn", this.sortColumn, this.sortColumn = sortColumn, false)) { if (sortColumn) { sort(); } else { updateClient(); } if (notifyParent) { Columns parent = (Columns) getParent(); if (parent != null) { if (sortColumn) { parent.setSortColumn(this); } else if (parent.getSortColumn() == this) { parent.setSortColumn(null); } } } } }