 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Craig Leidy Guest
|
Posted: Mon Jan 12, 2004 8:18 pm Post subject: DBNavigator Confirmation |
|
|
I'm using the DBNavigator connected to an Advantage DB in D5.
When someone hits the Delete (minus) Button I want to be sure
they know they are deleting a bunch of stuff.
So... I want to ask a special question.
"Are you sure you want to Delete <item> everywhere?"
Cause it's in at least 3 files.
Since I don't see an easy way to change the text of the Confirm Delete
Question, I opted for the BeforeAction of the Navigator.
If they say "Yes" then I'll do all summary deletes in the event
and let the DBNavigator do the rest.
If they say "No" I'll just jump the summary deletes...
But how do I get the Navigator to not delete the current record?
Thanks, Craig.
|
|
| Back to top |
|
 |
Ignacio Vazquez Guest
|
Posted: Mon Jan 12, 2004 8:35 pm Post subject: Re: DBNavigator Confirmation |
|
|
Craig Leidy wrote:
| Quote: | But how do I get the Navigator to not delete the current record?
|
Call Abort.
--
Cheers,
Ignacio
Help improve Delphi: http://qc.borland.com/
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Mon Jan 12, 2004 9:44 pm Post subject: Re: DBNavigator Confirmation |
|
|
On Mon, 12 Jan 2004 15:18:41 -0500, "Craig Leidy"
<surfsoft (AT) comcast (DOT) net> wrote:
| Quote: | But how do I get the Navigator to not delete the current record?
|
By raising an exception. One way to do that is to raise a silent
exception by calling SysUtils.Abort.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Jon Purvis Guest
|
Posted: Tue Jan 13, 2004 5:27 pm Post subject: Re: DBNavigator Confirmation |
|
|
Craig Leidy wrote:
| Quote: | I'm using the DBNavigator connected to an Advantage DB in D5.
When someone hits the Delete (minus) Button I want to be sure
they know they are deleting a bunch of stuff.
So... I want to ask a special question.
"Are you sure you want to Delete <item> everywhere?"
Cause it's in at least 3 files.
Since I don't see an easy way to change the text of the Confirm Delete
Question, I opted for the BeforeAction of the Navigator.
If they say "Yes" then I'll do all summary deletes in the event
and let the DBNavigator do the rest.
If they say "No" I'll just jump the summary deletes...
But how do I get the Navigator to not delete the current record?
|
procedure TFormClasses.DBNavigator1BeforeAction(Sender: TObject; Button:
TNavigateBtn);
begin
with DataModuleMN do begin
else if Button=nbDelete then begin
if MessageDlg('Deleting class will also delete associated class '
+'participation records. Delete now?', mtConfirmation,
[mbYes,mbNo],0)=mrYes
then TableClasses.Delete;
Abort;
end;
end;
end;
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|