Sounds like maybe something is getting mixed up in the internal bookkeeping of selected items. Instead of refreshing the existing data, it might be better just to create a whole new Grid from scratch.
/**
* Resets the SelectiomModel to an initial state.
* <p>
* Most often this means that the selection state is cleared, but
* implementations are free to interpret the "initial state" as they
* wish. Some, for example, may want to keep the first selected item as
* selected.
*/
…so the actual implementation is left some amount of freedom to do what it wants.
The implementation in MultiSelectionModel just does this:
/**
* Resets the selection model.
* <p>
* Equivalent to calling {@link #deselectAll()}
*/
@Override
public void reset() {
deselectAll();
}
so I’m not sure how that will play out. You’d need to investigate how exactly deselect works in that scenario (itemids have changed / selection is not included in itemids any more).