First you need to determine the angles between them.
Because we work on 3D and I don't want remind all my old Math classes, we only work with one axis, the Y.
So we need the angle between The Camera and the Grid.
It is important you use a 'Camera Rack', because the camera node himself doesn't have any rotation, It is the angle formed by the camera node and the point of interest, that we need to look. You can find some tutorial here to do a 'Camera Rack'. I assume that the camera Y rotation is drive by 'Null1'
You do like this:
Grid1.roty - Null1.roty
It is easy ! But we have now to determine after which value of angle the grid hide.
So You do like this:
ANGLE - ( Grid1.roty - Null1.roty )
Where 'ANGLE' is the angle after which the grid hide.
The problem we have know is: if the angle of the grid is negative.
So you do like this:
ANGLE - abs( Grid1.roty - Null1.roty )
'abs' is a function of the expression.
We have another problem here. Node visibility work only with one value, '1' means Visible, another Value means hide.
So you use the 'condition' function, like this:
cond ( ANGLE - abs( Grid1.roty - Null1.roty ) > 0 , 1 , 0 )
This works very well, but there is still some problem:
1- if you turn the grid manually, when it hide, you can turn it back. You have to do this with the Fcurves.
2- If you turn the grid to do several turn, the grid don't turn back visible.
The first problem is a Softimage interface problem, we can do nothing...
But the Second, we can do something. But I have some work to do. If I find a minute, I come back to write it...