When creating a new Row in a DataGridView with help of the command:
dataGridView1.Rows.Add();
it creates a new Row, but the e.RowIndex shows still the Index before the New created row.
privatevoid button1_Click(Object sender,EventArgs e){
dataGridView1.Rows.Add();}privatevoid dataGridView1_RowsAdded(Object sender,DataGridViewRowsAddedEventArgs e){MessageBox.Show(e.RowCount+";"+ e.RowIndex);}So in case I have 2 rows I would normaly have RowIndex 0 and 1. But when adding programmatically a new line with ".add()" the event RowsAdded shows that the RowIndex is still 1 instead of 2, which is the new created Row