Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted() in Grid
Message
From
02/02/2001 11:00:51
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00471551
Message ID:
00471780
Views:
23
Hi Mark,
When I issued a
NODEFAULT
RETURN 0
from the Deleted() method, I found no effect. (The delete via click still occurs). I wonder what the difference is?



>The following code is what I have in my base grid class. I also have a grid property call lWarning. If this property is TRUE, I prompt the user with a message box to confirm the deletion.
>LPARAMETERS nRecNo
>local lcRecordSource, lnSelect
>lcRecordSource = This.RecordSource
>if empty(lcRecordSource)
>   return
>endif
>lnSelect = select()
>select (lcRecordSource)
>if This.RecordSourceType < 2
>   local lnRetVal
>   goto record nRecNo
>   This.Refresh()
>   if This.lWarning
>      lnRetVal = MsgSrvr("Please confirm. Delete record?")
>      if lnRetVal <> IDYES
>         NoDefault
>         return 0
>      endif
>   endif
>   delete next 1
>   skip -1
>   if bof()
>      locate
>   endif
>   This.Refresh()
>endif
>NoDefault
>select (lnSelect)
>Return
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform