[GridMenu] Improve code