Vb net cellvalidating e cancel dating in barbados
EDIT: here is my validating methods: Here is how it looks when it happens, if I hit Escape key, the error message disappears, but when I try to click something else, Row Validation happens again and I back to this state: EDIT2: I use datatable as datasource for this datagridview.
Hi all, I need to override the event that is fired when I hit the Enter key in a datagrid.
Here's the code I've come up with so far: When I close the Message Box (which shows exactly when the condition is met), the focus goes to the row below.
As I said, I would like it to remain in the cell that has the duplicate content.
Cell Enter occurs after a cell gets the focus and Cell Validated occurs when the focus is about to leave.kernelcoder, first off thank you for your time!
I realized I forgot to thank you in my previous response.
I only want the message box to appear when I hit Enter after entering something and the content of the current cell (in the 4th column) is a duplicate of another cell in the same column. You need to handle the Selection Changed event too.