title: Winforms Panel Size
body: <p>In my form I have a panel with autosize = true.</p>
  
  <p>The panel contains a SplitContainer control with 2 panels arranged horizontally.</p>
  
  <p>The top panel contains a datagridview and the bottom panel contains a textbox.</p>
  
  <p>Is there a way I can programmatically resize the top panel, and hence the entire SplitContainer based on changes in the height of the datagridview (determined by the number of rows)</p>
  
  <p>UPDATE:
  I am now able to resize the SplitContainer which has Dock = Bottom, however, the Layout event of the parent panel does not get fired in response to changes in the height of the SplitContainer control even thought the parent panel has Autosize = True</p>