Announcement

Collapse
No announcement yet.

Master / Detail - best of both worlds with form or grid as detail

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

  • Master / Detail - best of both worlds with form or grid as detail

    So, I have a master detail / app in SC8. The Master is a form and what I want is a grid-like structure as the detail.

    The detail "grid" needs to be able to show row AND column totals, and allow addition of a new row, or editing of an existing row. I'm not too bothered whether the adding or editing is done inline or in a separate form (whether modal or not). Doesn't sound too unusual a request I wouldn't have thought. But I cannot get ALL those requirements to work with one detail app - I get half the functionality if I do the detail as a grid, and the other half if it's a form detail app.

    Capture2.JPG

    In the pic above I have added both types as detail apps to the same master to try things out - the top is a grid detail, the bottom a form detail in editable grid view. My preference is to make the bottom one work, but with the columns totals like I have in the top one.

    Bizarrely, and as an aside, re the bottom one, I do not need actually navigation buttons, but if I remove them all it says "no records found". Bug?

    Please - anyone any ideas how I can get what I need?

    Thanks

  • #2
    I think you can create a link on the grid to make it work, and this link will open a modal with the data from that specific clicked line, that will work for you?
    Best regards,
    Carlos Lacerda.
    ScriptCase Commercial Manager.

    Skype: carlos.lacerda82
    Email: carlos@scriptcase.net
    Visit our Blog: http://www.scriptcase.net/blog/
    Visit out fan page: http://www.facebook.com/Scriptcase

    Comment


    • #3
      Originally posted by carlos View Post
      I think you can create a link on the grid to make it work, and this link will open a modal with the data from that specific clicked line, that will work for you?
      This is not a valid solution for this carlos. modal open inside the frame, and for this most of the time modal is bigger than the iFrame.

      I don't understand why Grid is not possible as detail application. This allows to get a proper Detail, integrate graphics, and so more... It's all almost done, just creation of new records don't works, but Grid can be integrated.

      I don't think is so dificult compared to forms.
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment


      • #4
        hi adz, i read your post 4 times and couldn't completely understand it ok, from what i got, why don't you use the first one (as it already gives you the totals you want) and add a button down there to open a from for you to the same table... then on updating that form it gets update directly in the grid and you have the new line added to the grid with new totals,,, if this is what you want, there is a video showing how to update that dynamically, let me know if that is what you want and if you could find the video or not, it may give you a hint

        Comment


        • #5
          Originally posted by itsme3 View Post
          hi adz, i read your post 4 times and couldn't completely understand it ok, from what i got, why don't you use the first one (as it already gives you the totals you want) and add a button down there to open a from for you to the same table... then on updating that form it gets update directly in the grid and you have the new line added to the grid with new totals,,, if this is what you want, there is a video showing how to update that dynamically, let me know if that is what you want and if you could find the video or not, it may give you a hint
          What he means is, on detail, Any of both, grid or form is totally supported. Grids can't create new records and doesn't have toolbars, and form, is not a grid, and you can't gets totals and so on.
          /Giuseppe

          Professional Scriptcase Services
          Some Customers opinions

          Comment


          • #6
            yes, then i understood correctly.

            create a button that takes you to a new row on the same table, open modal for example, make the new record, then go back to grid, you will find it there and it will be calculated in the grid already! even you can do it using ajax and update the values based on ajax, there is video for similar functionality (to update fields then gets update on master application dynamically on ajax)

            Comment


            • #7
              Thanks all for answering.....

              Ok - so in order:

              @Carlos - yes, that would be fine, but as Giu says, the form that opens has to fit in the iframe and is too big so doesn't really work.

              @itsme3 - same here too, no? Any form that opens will be partially obscured by the iframe it is in?

              Which is why the bottom detail example is preferred as I can edit and add a row inline (all fits in the iframe). The only thing missing is the totals row.

              Now, I am happy to code the totalization myself if someone can tell me how to show the totals on an editable grid view detail form (easy enough to do on a single record form with custom foelds). One thing i did try (which half worked) was to create a 3rd detail section under the main detail showing just calculated totals, but because the 2 detail sections are independant, the columns don't really line up.

              :-)

              Comment


              • #8
                hmmmm, just a though, why don't you use the footer? if you are not using it already in your application, put some variables there to calculate the totals for you all the time, hence you will end up with the second one that you liked to add/edit rows inline yet have the vertical totals in footer, under them, all the time in CSS you can customize that to have it the way you like... just a though really not much, because
                The only thing missing is the totals row
                sounds much harder

                Comment


                • #9
                  Using footer might be a good idea - will look into that.

                  Since then I have tried using an application link to get a "pencil" in the "grid" version (top one) and opening a form in a new window so iframe does not become the issue.

                  When I run it - no pencil appears in the grid (seen other posts stating this). However if I right-click (in Chrome) on the grid and choose "reload frame", it reloads the iframe and the pencils then appear! And they work how I expect (once they're visible). So now, just need to figure out why a reload is needed - bug I suspect?

                  @Carlos - one for Bartho! :-)

                  Comment


                  • #10
                    adz, bro, Carlos and bartho do not come here looool

                    allow me just to add the same note again, can't you just add a button to your grid app that has totals-enabled as desired, form to open normal away... in another page, not in modal... that form simply will open in our screen alone with few fields... once added the info, put sc_redir, back to your grid, you will have the recently added record along with totals! hmmm also depends if you are going to add new record on hourly bases for example, then it might take longer, but in general is much better than chasing carlos and bartho lool just kidding

                    Comment


                    • #11
                      itsme3

                      I'll add it as "bug" question separately so carlos / bartho may be see it :-)

                      itsme3, I have it working - but the app link needs refreshing before showing for some reason. When they do show they work as expected - so its solved bar the refresh issue.

                      How is that different to your button solution? Are you suggesting a button on each row, or just at the top (or both)? I need to be able to edit each record, as well as add new ones.

                      Comment


                      • #12
                        hi bro, regarding the refresh, can't you use ajax instead? as mentioned earlier, there was a video showing you how to do such functionality using ajax

                        and yes, i meant one button to open a new form away from the gird, just simply go to that form, fill the fields then on submit adds to db and redir back to grid...

                        you can make a button in each row of the gird as well, simply make it open the same said-abovve form in order to edit it accordingly (using application link) then back to grid after update

                        hence you dont' need refresh as well, i think

                        hmmmm, as per my knowing to SC, grid is much more supported and has more macros, you can add colors to your values later (individual or conditional), have your totals, can have the edit button handy, details button shows you more info.. summary...group by... charts... etc.. that is why, an editable grid form will not have all this power even if you got the totals working, there will still be limitation somehow

                        well, that is my 2 cents as Americans say lool

                        Good luck

                        Comment


                        • #13
                          thanks itsme3

                          i don't think you understand what i mean about the refresh - i'll raise it as a separate question (probably tomorrow) as i think its a bug -

                          essentially when you open the master/detail form with the detail being the grid with totals, it should show pencils on the left of each row as I have set up an application link to open that record with a separate non-modal form. However, no pencils appear. But - if i right click on the grid i get a browser menu and from there i choose "refresh frame" - and that detail part reloads and then the pencils are suddenly there! Weird and a bug as I'm sure the pencils should appear without me doing any browser refresh

                          Comment


                          • #14
                            Interesting!

                            Comment


                            • #15
                              grid detail with form style when add new detail data

                              Originally posted by Giu View Post
                              What he means is, on detail, Any of both, grid or form is totally supported. Grids can't create new records and doesn't have toolbars, and form, is not a grid, and you can't gets totals and so on.
                              Hi Giu, when you are saying "grid or form is totally supported" for details.
                              for Grid, does it mean "Form application" with type "Editable grid / Editable grid view", or is it really grid form ?

                              i am asking because i tried to make a detail link with "Grid Form" and in the link there is no "link parameter available", so my detail grid is not connected to Master form.

                              And when i link the detail with "form application" with "Editable grid" the link parameter is available and it works.
                              the problem is, this kind of detail is adding new row directly in the detail row / create a new row.
                              i found it will be hard for our application to add new detail directly in a new grid row because so many column to add.
                              i prefer to have a grid detail but when adding a new detail,
                              will need to add with "single form" style. (maybe open modal), and when new row added, the grid refreshed/added to the grid.
                              is it possible ?

                              many thanks
                              moelath

                              Comment

                              Working...
                              X