I need to capture an event from the text box that is used to edit a
cell in the DataGridView. So I did the following:
EditingControlShowing (sender, e)
{
TextBox t = (TextBox) e.Control;
t.KeyPress += new KeyPressEventHandler (...)
}
Guess what? The KeyPress handler is triggered multiple times, and it
gets worse every time the EditingControl is shown. I think I know
why, and I think I need to do something like this;
t.KeyPress = null;
t.KeyPress += new KeyPressEventHandler (...)
The problem is, I can't do the first line here. How do I get rid of
the events that are already there?
Dom