I want to add a new rows in datagridview when cell leave event occurs.It shows error like Operation can not be performed in this event handler...
my code is here
if (e.ColumnIndex == 2)
{
if (dgvItm.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null)
{
dgvItm.Rows.Add();dgvItm.Rows[dgvItm.Rows.Count].Cells[0].Value = dgvItm.Rows.Count;
}
}