diff options
Diffstat (limited to 'client')
-rwxr-xr-x | client/src/main/java/com/vaadin/client/widgets/Grid.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java index 50616c7930..746ff2be25 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -4884,10 +4884,11 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, ColumnConfiguration conf = null; int index = 0; - if (grid != null && (bodyRenderer instanceof WidgetRenderer - || renderer instanceof WidgetRenderer)) { + if (!isHidden() && grid != null + && (bodyRenderer instanceof WidgetRenderer + || renderer instanceof WidgetRenderer)) { // Column needs to be recreated. - index = grid.getColumns().indexOf(this); + index = grid.getVisibleColumns().indexOf(this); conf = grid.escalator.getColumnConfiguration(); widthInConfiguration = conf.getColumnWidth(index); @@ -4908,7 +4909,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, conf.setColumnWidth(index, widthInConfiguration); } - if (grid != null) { + if (!isHidden() && grid != null) { grid.requestRefreshBody(); } } |