If you want the user to enter the details then try something like
private void textBox1_Validated(object sender, EventArgs e)
{
dataGridView1.Rows.Clear();
dataGridView1.AllowUserToAddRows = false;
int numRows;
if (int.TryParse(textBox1.Text, out numRows))
{
dataGridView1.Rows.Add(numRows);
}
}
You will also need some validation to check that all the rows of the "form" have been "filled in" e.g. in the
dataGridView1_Validating
event