No, you cannot control the amount of rows to grow or shrink based upon the vertical height of the entire grid.
You are better off truncating the values displayed in the grid and then having a view details button in each row or creating a hover effect that displays the full text if the user wishes to view it.
Another possibility is to to have a drop down list with page size values (i.e. 5, 10, 20, 25, 50, etc.) that allows the user to adjust the amount of rows displayed on a page to their liking.