diff options
Diffstat (limited to 'server/src/com/vaadin/ui/Grid.java')
-rw-r--r-- | server/src/com/vaadin/ui/Grid.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index df64ee85ed..77b57bceda 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -2251,7 +2251,7 @@ public class Grid extends AbstractComponent implements SelectionNotifier, public Column setLastFrozenColumn() { checkColumnIsAttached(); grid.setFrozenColumnCount(grid.getState(false).columnOrder - .indexOf(this) + 1); + .indexOf(getState().id) + 1); return this; } @@ -5229,4 +5229,17 @@ public class Grid extends AbstractComponent implements SelectionNotifier, public void removeListener(ItemClickListener listener) { removeItemClickListener(listener); } + + /** + * Requests that the column widths should be recalculated. + * <p> + * In most cases Grid will know when column widths need to be recalculated + * but this method can be used to force recalculation in situations when + * grid does not recalculate automatically. + * + * @since 7.4.1 + */ + public void recalculateColumnWidths() { + getRpcProxy(GridClientRpc.class).recalculateColumnWidths(); + } } |