Yosi,
The reason it doesn't work is you are probably trying to get it while it
is in edit mode (a cell is being edited). In that case, the textbox is
getting the key presses, not the data grid.
You will have to find the windows handle of the editor, and hook into
that.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"[Yosi]" <Yo**@discussions.microsoft.com> wrote in message
news:08**********************************@microsof t.com...
Why the following
dataGrid1_KeyPress
dataGrid1_KeyDown events doesn't generates