Announcement

Collapse
No announcement yet.

Adding record in nested grid

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

  • Adding record in nested grid

    As in the header, I have a Parent/Child App, with nested grid. How can I add a Add/Change/Delete buttons on the nested grid ? When creating a link I have had all aptions checked to add appropriate buttons but when running and App no buttons are present.

    Arthur

  • #2
    Re: Adding record in nested grid

    The easiest would be to create a "New Field" for the nested grid and define it as "HTML Image".
    In the process you can select an image for it and configure all the parameters you need.

    Comment


    • #3
      Re: Adding record in nested grid

      Sadarahu:

      Have you solve the problem ?
      The jsbinca's solution adds an "add button" on each row of the nested grid, but It doesn´t work when the grid is empty (and no rows show) and when It doesn't is empty to have several "add" buttons (one for each row) doesn't seem has sense.

      I think that the button must be on the toolbar (top of the nested grid).
      Any idea or solution?

      Thanks.
      Pablo.

      Comment


      • #4
        Hi,
        as a newbie it's very hard to find the suitable information. There are hundreds of hits with 'grid' or 'link' .... So please be patient with us beginners ;-) I didn't find the solution to the 'adding record in nested grid' problem.


        How could that be done?

        Joe

        Comment


        • #5
          A nested grid is what it says: a grid. You cannot add records in a grid, you need a form to do that. But you could try to add a link to the nested grid that goes to a modal form for instance.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment


          • #6
            Hello Albert, thanks for your answer.

            I don't want to add records into a grid. I just want a button/link in the nested grid (header) to call a form to add a record.
            I could do this by adding a link to the record in the grid but this is useless if there is no record and I want to add the first one.

            If I run the nested grid as 'standalone' it shows a header (and footer) where I have an add button which leads me to my form. But as nested grid the header and footer is not displayed.
            I hope you understand what I mean.

            Joe

            Comment


            • #7
              Originally posted by Joe View Post
              Hello Albert, thanks for your answer.

              I don't want to add records into a grid. I just want a button/link in the nested grid (header) to call a form to add a record.
              I could do this by adding a link to the record in the grid but this is useless if there is no record and I want to add the first one.

              If I run the nested grid as 'standalone' it shows a header (and footer) where I have an add button which leads me to my form. But as nested grid the header and footer is not displayed.
              I hope you understand what I mean.

              Joe
              I understand what you mean, but because a nested grid doesn't show the header/footer you cannot add buttons to it. But what might be possible is that you add a custom field of type image. Then you can apply a link to a form. Perhaps that solves your issue.
              Albert Drent
              aducom software netherlands
              scriptcase partner, reseller, support and (turn-key) development
              www.scriptcase.eu / www.scriptcase.nl

              Comment


              • #8
                Originally posted by aducom View Post
                I understand what you mean, but because a nested grid doesn't show the header/footer you cannot add buttons to it. But what might be possible is that you add a custom field of type image. Then you can apply a link to a form. Perhaps that solves your issue.
                I think this only works if you already have at least one record. But if you want to create the first record there will be no image link.

                Would it be possible to add a button/link to the master grid header and call a form? In this case I would need to transfer a variable to the button that the child record will be written to the correct master record. How would this be done?

                Just a thought - in grids you can select a row by clicking it once with your mouse and it changes colour. By doing this, is there a value generated which I can use as a variable for my link/button?

                Joe

                Comment


                • #9
                  I don't know actually, but it's worth trying. Sometimes you have to be creative and find work-arounds to get things done. Not always the nicest possible method, but you have to do with what you get.
                  Albert Drent
                  aducom software netherlands
                  scriptcase partner, reseller, support and (turn-key) development
                  www.scriptcase.eu / www.scriptcase.nl

                  Comment


                  • #10
                    I think another method to that would be to:
                    1. Select a parent record (i.e checkmark)
                    2. do the background lookup (SC_lookup...) macro to find child record (in case of adding new record this is not needed)
                    3. call FORM App

                    In my desktop tool each call from the browse to the form trigers a STATUS variable which can be: 1-Add 2-Chenge 3-Delete 4-Lookup 5-View
                    Based on its value the form can take different actions and can present/hide fields etc. It is smart and convenient way of working with grids. I also do not understand why SC does not provide DELETE button by default (although I know it can be programmed). Basically all 5 actions should be available from the grid and having to open a FORM in order to delete record is very inconvenient.

                    Arthur
                    -----------------------------------------
                    Arthur Klisiewicz
                    dATA POINT SOFTWARE
                    www.datapointsoftware.com

                    Comment


                    • #11
                      Thanks Arthur, I'll give it a try with my limited knowledge.

                      Joe

                      Comment

                      Working...
                      X