How to set DataGridView's Height properties if the control is inside a ToolStripControlHost? C# WINFORMS
<p>I have a TextBox that will show a DataGridView within a contextMenuStrip everytime the user presses the F1  key. I used ToolStripControlHost to host the dataGridView inside the contextMenuStrip. Please consider my code:</p>

<pre><code>private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
    if (e.KeyData == Keys.F1)
    {
        dataGridView1.BindingContext = this.BindingContext;
        dataGridview1.Height = 30;
        dataGridView1.DataSource = dt; // some DataTable with 50+ rows,..or greater.

        ToolStripControlHost tsHost = new ToolStripControlHost(dataGridView1);
        contextMenuStrip1.Items.Clear();
        contextMenuStrip1.Items.Add(tsHost);

        contextMenuStrip1.Show(textBox1, 0, 27);
    }
}
</code></pre>

<p>My problem is I can't set programmatically the height of the dataGridView when it's already added in the contextMenuStrip as an item. Since I can't set the height of the grid, the tendency is it adjusts its height depending on the size of its dataSource. </p>

<p>I'm missing something in my code? Please help.. thanks.</p>
