I am using a datagridview in windows form, now I want to create rows in datagridvew dynamically
It depends on the user input, if he enter 2 then 2 rows will be created if he enter 5, 5 rows will be created
is there any way the rows are automatically created when I focus on the last column of the datagridview
You can use the Rows collection to manually populate a DataGridView control instead of binding it to a data source. The following example shows you how to manually add and insert rows. This example assumes that you have added four DataGridViewTextBoxColumn instances to the control's Columns collection.
this.dataGridView1.Rows.Add("five", "six", "seven", "eight");
this.dataGridView1.Rows.Insert(0, "one", "two", "three", "four");
refer this for create new row in datagridview