I have an unbound DataGridView, which fill manually with DataGridViewRows. AllowUserToAddRows is set to false and everything works as expected - no NewRow is shown in the botomn of the grid.
In one method I add some more rows, edit some rows and remove some others. These manipulations work fine, BUT after these manipulations the NewRow becomes visible. NewRowindex property changes from -1 to a value, indicating it's actual index, but the AllowUsersToAddRows property stays false. This happens somewhere behind the scenes, as nowhere in my code, as far as I could see while debugging, the NewRowIndex does not change from -1 to a bigger value.
Does anyone has any clue about what could be wrong here, or maybe some detail, that i might be missing?
Later I'll try to reproduce this behavior in a simpler project and paste some code here.
EDIT: Ok, so trying to reproduce the bug in a simpler project, I noticed, that this occurs only if after all the adding/editing/removing I set the:
dgMap.CurrentCell = null;