Ive run this through the debugger many times. It appears that the Validate event more than once for some reason. For instance, if I set e.Cancel = True, then show a Message Box, it will fire again after the Ok is clicked on the Messagebox. This is ONLY happening on Datagrid validation. Other textboxes defined on the for work fine.
.
private
{
TextBox txt = sender as TextBox;
if (txt.Text != "Check") {
e.Cancel = true;
MessageBox.Show("Should not be Check") // Sends error, and keeps focus in column if clicked out of. If TAB'd out of, focus changes
// How can I not allow the TAB to work if invalid, but still allow TABs if value is valid?
}
else
e.Cancel = false;