@SuppressWarnings({"unchecked", "rawtypes"}) @Override public void bindGrid(Grid grid) { if (this.grid != null) { this.grid.removeListener(Events.CellMouseDown, this); this.grid.removeListener(Events.BeforeEdit, this); this.grid.removeListener(Events.ViewReady, this); this.grid.getView().removeListener(Events.Refresh, this); this.grid.getView().removeListener(Events.RowUpdated, this); keyNav.bind(null); bind(null); } this.grid = grid; if (grid != null) { grid.setTrackMouseOver(false); grid.addListener(Events.BeforeEdit, this); grid.addListener(Events.CellMouseDown, this); grid.addListener(Events.ViewReady, this); grid.getView().addListener(Events.Refresh, this); grid.getView().addListener(Events.RowUpdated, this); keyNav.bind(grid); bind(grid.getStore()); } }