The best commentary for grammar on the OT is probably Keil and Delitzsch. For the NT, I recommend H.A.W. Meyer, although the commentaries in the series not written by him are considerably lower in quality. They will force you to think of most of the grammatical issues that are present in the text.