Still, it doesn’t make much sense when we think about the way Check Box’s work, in that, they can only ever be On or Off, and that once you have made your selection, you’re probably pretty confident that you want to change the value.
Any solution is going to involve using an event that definitely will fire to stop the Data Grid View from thinking it’s in edit mode.
Either way, I need the focus to remain in the cell instead of going to the next row when I hit Enter.
I just tested with ' Cell Enter' event and I found that it works as you expect.
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.You might want to handle this for a number of reasons: to enable a save button, to change the appearance of selected items, to display a pop-up window, or to check for consistency against other choices.It turns out that this is trickier than it might seem and doesn’t work great out of the box from .This problem was also raised in a Stack Overflow Question which seemed to advocate for handling the method, thereby ensuring that the grid would evaluate whether or not the Cell’s value had, indeed, changed and fire the corresponding event appropriately I must admit, this works, but feels like more of a work around than a solution.What if someone is able to make a selection without a click event?