If a user enters invalid text in a DataGridView's cell I want to prevent the user from leaving that cell and display an error icon in that cell with an error message in a tooltip. It seems that normally the error icon won't appear until the cell is no longer in edit mode. I found an example of how to get the error icon to appear while it's still in edit mode, but the tooltip won't show up when I hover over it.
I'm using Windows 7, but I couldn't get it to work in XP either, so we can rule that out.
Can anybody figure out what the example is missing or suggest an alternative approach that would yield the same results?
To get the example working you'll need to create your own form, copy/paste the example code, add using System.Drawing.Drawing2D;
, and assign the event handlers yourself.