Disable application link in grid

I have a grid with a clickable application link based on one of the fields. Is there a way to disable this link for that row based on some criteria. Like if({field1}==‘D’){ DISABLE APPLICATION LINK}