Add New Row When Focus On Last Column
thanks in advance....................
thanks in advance....................
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Roei BarRank #1,271 · 1.4K reputationPosted Oct 2, 2009, 3:58 AM EDT
private DataGridViewRowCollection collection; private DataTable dt;// this is bound to DataGridView private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == dataGridView1.ColumnCount - 1) { DataRow dr = dt.NewRow(); dt.Rows.Add(dr); lblRows.Text = dataGridView1.Rows.Count.ToString(); } }Kirtan PatelRank #292 · 8.6K reputationPosted Oct 2, 2009, 8:37 AM EDT
the dataGridView Does it Automatically
when you are on last row last column it automatically add new Row :)
Master BillaRank #2,229 · 630 reputationPosted Oct 2, 2009, 11:30 PM EDT
When you set add new row in true in gridview it will add new row
Thank you
Soumya Surendran84 reputationPosted Oct 5, 2009, 1:19 AM EDT