When shadows are enabled for the view, an entity can be excluded from the shadows display using IMaterial_DG.CastsShadows or IMaterial_DG.ReceivesShadows properties.
See Light sample for an example.