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.
892a2025-b304-4a3c-91af-796c0f19c76a|1|5.0
-
Resetting the value of an Identity column in T-SQL
DBCC CHECKIDENT (tablename, reseed, 7) -- When you insert a row, the Identity column will have a value of 8.
SELECT CONVERT(DATETIME, CONVERT(CHAR(8), 20070824))
a972f281-0bfd-424a-8959-24e171f94cf4|0|.0