mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 01:29:31 +02:00
LCL, check if dataset empty when deleting a record in dbgrid, from Boguslaw Brandys, issue #13246
git-svn-id: trunk@18870 -
This commit is contained in:
parent
b3eb59ed47
commit
f940156a21
@ -1824,14 +1824,15 @@ begin
|
||||
VK_DELETE:
|
||||
begin
|
||||
doOnKeyDown;
|
||||
if (Key<>0) and (ssCtrl in Shift) and GridCanModify then
|
||||
if (Key<>0) and (ssCtrl in Shift) and GridCanModify and
|
||||
not FDataLink.DataSet.IsEmpty then begin
|
||||
if not (dgConfirmDelete in Options) or
|
||||
(MessageDlg(rsDeleteRecord, mtConfirmation, mbOKCancel, 0 )<>
|
||||
mrCancel)
|
||||
(MessageDlg(rsDeleteRecord, mtConfirmation, mbOKCancel, 0 )<>mrCancel)
|
||||
then begin
|
||||
doDelete;
|
||||
key := 0;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
VK_DOWN:
|
||||
|
Loading…
Reference in New Issue
Block a user