The Dojo grid has a autoHeight property. Perhaps that will solve your problem.
I also know there's a bug with using autoHeight in Dojo 1.5 that should be solved in 1.6. Domino 8.5.3 should come with Dojo 1.6, so you might want to wait a bit and try it in that version.
Mark