In my form I have a panel with autosize = true.
The panel contains a SplitContainer control with 2 panels arranged horizontally.
The top panel contains a datagridview and the bottom panel contains a textbox.
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)
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