DataGridView Validation
<p>For textboxes, I have a data validation method that's like this:</p>

<pre><code>string allowedCharacterSet = "1234567890\b\n";

if (allowedCharacterSet.Contains(e.KeyChar.ToString()) == false)
{
        e.Handled = true;
}
</code></pre>

<p>The way it works is, if the user types a character that isn't in allowedCharacterSet, the character doesn't appear in the textbox, preventing them entering invalid data.</p>

<p>My question is: how do I apply this to a DataGridView? Let's say I have 3 cells - the first is a name, so I'd want alphabet only. The second is a quantity integer, so numeric only. The third is an email address, so I'd have numbers, letters, a period and the @ symbol in the allowedCharacterSet string. These things I can do quite easily, but as you can't attach KeyPress events to individual DataGridView cells, I'm not sure what to do.</p>
