12-09-2019, 10:14 PM
(آخر تعديل لهذه المشاركة: 12-09-2019, 10:26 PM بواسطة larbiparadox.)
غير هذا الكود
بهذا الكود
وإذا اردت عند الضغط على enter يقوم بالحفظ
كود :
if DETILABSTable2.State in [dsInsert, dsEdit] then begin
Abort;
end;كود :
if DETILABSTable2.State in [dsInsert, dsEdit] then begin
if (Key <> VK_LEFT) and (Key <> VK_RIGHT) then Abort;
end;وإذا اردت عند الضغط على enter يقوم بالحفظ
كود :
if DETILABSTable2.State in [dsInsert, dsEdit] then begin
if Key = VK_RETURN then DBGrid2.DataSource.DataSet.Post;
if (Key <> VK_LEFT) and (Key <> VK_RIGHT) then Abort;
end;

![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)