Hi,
That's right - there's no such event. But you have another way - deriving a
new control from the grid and overriding some virtual methods.
The ones you will need are:
ProcessCmdKey
PreProcessMessage
Check for the WM_KEYDOWN message to catch the 'Del' keypress, and also check
for WM_SYSKEYDOWN sent when the user presses "Alt-Del" (yes, this shortcut
also works in the grid).
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"bie2" <ta******@adelphia.net> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hi,
I have a datagrid with many records, I want to delete all of them.
I'm doing CTRL-A and press delete...I take a long time to delete it and
the UI is froze during that time.
So I would like to make this delete in a worker thread, but how can I
catch the delete command before it happen??
I'm doing a windows app.
A solution I have is capture the keypress event and see if it's delete
has been pressed and if a complete row has been selected and do the
worker thread there.
But is there an event generated like on the web datagrid, that have a
DeleteCommand event.
Thanks
Frank