Where "optimal size" is "all rows and columns are visible, but not more". (e.g. no dark gray background is visible)
Edit:
To clarify: I dont want to auto resize the columns. I have fixed width columns and rows. I want to have the whole control resized. e.g. reduce the width if there is dark gray space visible, increase the width if not all columns are visible, same for vertical space.