Announcement

Collapse
No announcement yet.

delete record in grid

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • delete record in grid

    is there any way I can delete a record in the grid by ticking the record and clicking on a delete button?

    how can I achieve that without having to open the record and then delete it?

  • #2
    You can use a editable grid / editable grid view. In the normal grid the records are readonly and can't (not simple) delete.
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Originally posted by ingjfnc View Post
      is there any way I can delete a record in the grid by ticking the record and clicking on a delete button?

      how can I achieve that without having to open the record and then delete it?
      1. You can create a Run button, collect the id of the records, redirect to a control application with the IDs as param, and perform a delete there. Then redirects back.
      2. You can create a virtual field, with a red cross image, thath links to a control application, passing ID as param, and perform a delete there. Then redirects back.
      3. You can do both. 1 and 2
      Of course, you can use a form in "editable grid" mode too as RHS suggest
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment


      • #4
        I usually use a simplified version of method 1. described by Giu, doing everything inside the PHP run button:
        - onRecord, directly execute a SQL delete of each single record
        - onFinish, just show a feedback message to the user

        I guess it's not very efficient compute wise, especially if you process many records and the sql server is remote to the http server, but it's very simple in terms of code and no need to redir to any external app.

        Comment


        • #5
          Can I include security to those buttons? so I can restrict the button to appear only to administrators? I don't want everyone to be able to delete records

          thanks

          Comment


          • #6
            Originally posted by ingjfnc View Post
            Can I include security to those buttons? so I can restrict the button to appear only to administrators? I don't want everyone to be able to delete records

            thanks
            You have to control manually

            EDIT: Or control wich groups has access to "visit" the application createrd to delete the records.
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment

            Working...
            X