diff options
-rw-r--r-- | client/src/com/vaadin/client/widgets/Grid.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index 8d7e6f892c..4e91342091 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -141,6 +141,7 @@ import com.vaadin.client.widget.grid.events.ScrollHandler; import com.vaadin.client.widget.grid.events.SelectAllEvent; import com.vaadin.client.widget.grid.events.SelectAllHandler; import com.vaadin.client.widget.grid.selection.HasSelectionHandlers; +import com.vaadin.client.widget.grid.selection.MultiSelectionRenderer; import com.vaadin.client.widget.grid.selection.SelectionEvent; import com.vaadin.client.widget.grid.selection.SelectionHandler; import com.vaadin.client.widget.grid.selection.SelectionModel; @@ -1361,7 +1362,9 @@ public class Grid<T> extends ResizeComposite implements } private void updateSelectionCheckboxesAsNeeded(boolean isEnabled) { - if (grid.getSelectionModel() instanceof Multi) { + // FIXME: This is too much guessing. Define a better way to do this. + if (grid.selectionColumn != null + && grid.selectionColumn.getRenderer() instanceof MultiSelectionRenderer) { grid.refreshBody(); CheckBox checkBox = (CheckBox) grid.getDefaultHeaderRow() .getCell(grid.selectionColumn).getWidget(); |