I would use a requirement, which you probably did. Requirements have 2 different nodes you can use: Show and Use. If you use Show, the icon will disappear, if the requirements are not met; if you use Use instead, it becomes greyed out. You can also specify a tooltip, so it doesn't just say "Requires: XY" but something like "Requires: Research of XY at your research building" or whatever.
I would use a requirement, which you probably did. Requirements have 2 different nodes you can use: Show and Use. If you use Show, the icon will disappear, if the requirements are not met; if you use Use instead, it becomes greyed out. You can also specify a tooltip, so it doesn't just say "Requires: XY" but something like "Requires: Research of XY at your research building" or whatever.