void __fastcall TfrmMain::StringGrid1KeyPress(TObject *Sender, char &Key) { if ( (48 < Key) && (Key > 57) ) { // фокус сдесь Key = '\0'; } }