I was developing a Windows Forms application that made use of the datagridview control. I created a UserDeletingRow event handler that included a message box prompt warning the user that they were about to delete a row. Initially, the UserDeletingRow event handler worked fine; however, after making some code changes to other parts of the code behind page for the form, the UserDeletingRow event stopped firing. I checked the AllowUserToDeleteRows property for the datagridview and it was set to true. I also checked the VirtualMode property and it too was set to true.
To make a long story short, it turns out the culprit was a comboBox.Focus() statement. In my code, I added the comboBox.Focus() statement to a routine that executed in conjunction with a datagridview RowEnter event. After commenting out the statement, the UserDeletingRow event resumed firing.