Enforce grid selection logic.