>Hi Andrus,
>
>Basically, you have to override the ProcessCmdKey method in your DataGrid sub-class ... see this article for more information:
>
>
http://www.codeproject.com/cs/database/DatabaseAcessWithAdoNet1.asp#KeystrokesThank you. It works.
But how to close form from DataGrid ProcessCmdKey() method?
I used
((Form)this.Parent.Parent.Parent) .Close();
If grid is not placed in tabpage then this code does not work.
How to find grid parent form ?
In Visual FoxPro this is easy becauses VFP has thisform
However, DataGrid does not have parentform property.
Andrus