NetTalk Central

Author Topic: NetWebBrowse - Blocking delete of select record  (Read 3907 times)

bwhisler

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
NetWebBrowse - Blocking delete of select record
« on: February 10, 2010, 05:52:57 AM »
I'm using NetTalk 4 (latest) with Clarion 6.3 for a web server
application and have a question on the NetWebBrowse / NetWebForm.

I have a browse of a list of records with the ability to add, edit and
delete. However I want to prevent the deleting of one specific record
(Sysid = 1). I found where I could block it being served however with
no message given, the user is going to wonder what happen.

I assume that I need to add some embed code but need to know where and what in order to block the delete as well as show a message to the user.

Thanks in advance!


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebBrowse - Blocking delete of select record
« Reply #1 on: February 10, 2010, 08:14:06 AM »
Do you have the delete button "in each row", or just 1 delete button under the browse?

The way I'd do this is
a) tick off the Delete button on the "Form" tab of the browse.
b) add a delete button to the browse row
(Type: Button, Action:Delete)
c) set the _Conditional_ for the field to be Sys:Id = 1 (or whatever) - and set Field there to be ''

And that's all - see rather cryptic attached pic.



[attachment deleted by admin]

bwhisler

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: NetWebBrowse - Blocking delete of select record
« Reply #2 on: February 10, 2010, 09:15:07 AM »
Thanks Bruce, I will give that a try and it will meet my requirements.

However with that said, can I accomplish it using the single "Delete" button? I would prefer that method because it takes up less space in the browse.

Barton

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: NetWebBrowse - Blocking delete of select record
« Reply #3 on: February 10, 2010, 02:22:18 PM »
you could but you would need to add your own delete button so each time a user clicks on a record in the browse you can refresh your button and if it hits that record make it read only or hide it.

you might be able to do the same with NT std delete button but I haven't worked out how to do that so I generally add my own buttons if I need to do anything fancy.

bwhisler

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Re: NetWebBrowse - Blocking delete of select record
« Reply #4 on: February 10, 2010, 02:48:04 PM »
Thanks Kevin.

I had thought of that but had hoped on something a little easier since I am not concerned with stopping them from clicking on the delete button but rather if the do "after being told not to", then trap the delete with a message.

I will go back and take a fresh look with yours and Bruce's suggestion.

Barton