There is datagridview in my project and i write some code cellEndEdit event but when I type in cell and click on next cell it raises error as "Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function."
private void dgvQuotation_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
if (dgvQuotation.CurrentCell.ColumnIndex == 0)
{
dgvQuotation.CurrentCell = dgvQuotation.CurrentRow.Cells[2];
dgvQuotation.CurrentRow.Cells[1].Value = 0;
// dgvQuotation.CurrentRow.Cells[3].Value = 0;
dgvQuotation.CurrentRow.Cells[3].Value = 0;
dgvQuotation.CurrentRow.Cells[4].Value = 0;
return;
}
}
Loading


Shweta LodhaRank #31 · 39.8K reputationPosted Apr 1, 2014, 6:56 AM EDT
VulpesRank #55 · 29.2K reputationPosted Apr 1, 2014, 9:44 AM EDT