Modify grid buttons display logic