Announcement

Collapse
No announcement yet.

Alternative to Editable Grid on Master/Detail

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

  • Alternative to Editable Grid on Master/Detail

    Hi,

    I know in Master/Detail, is not possible to have a New button in detail using grid application, but for my requeriments, I need (and I don't like Editable Grid) to show as Grid, and add new lines on modal, and update detail and master fields.

    What is best approach for this? A "New Detail LIne" calling a form, and how to uipdate detail on finish? and so on......
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

  • #2
    Keyword header (Value)!
    I'm pretty sure you'll figure it out. :-)

    onScriptInit

    $link = "../form_position/form_position.php?v_rch_id=".[glo_rch_id]."&rpos_id=0";

    [header_button] = "<button type='button' class='scButton_default' onclick=\"parent.window.tb_show('', '".$link."&nmgp_url_saida=modal&nmgp_outra_jan=tru e&TB_iframe=true&height=160&width=750&modal=true ', '');
    \">New Position</button>";


    onAfterInsert of the form:

    echo "<script>parent.frames['nmsc_iframe_liga_nameofgrid'].window.location.href += '''; window.parent.tb_remove();</script>";

    jsb

    Comment


    • #3
      Hello

      I would create a php button in the master form to redirect to the detail form on modal, so you don't have to customize your code 2 much.

      Regards

      Comment


      • #4
        Originally posted by jsbinca View Post
        Keyword header (Value)!
        I'm pretty sure you'll figure it out. :-)

        onScriptInit

        $link = "../form_position/form_position.php?v_rch_id=".[glo_rch_id]."&rpos_id=0";

        [header_button] = "<button type='button' class='scButton_default' onclick=\"parent.window.tb_show('', '".$link."&nmgp_url_saida=modal&nmgp_outra_jan=tru e&TB_iframe=true&height=160&width=750&modal=true ', '');
        \">New Position</button>";


        onAfterInsert of the form:

        echo "<script>parent.frames['nmsc_iframe_liga_nameofgrid'].window.location.href += '''; window.parent.tb_remove();</script>";

        jsb
        Sounds interesting JSB. But, how is suppose I will show this button?
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          Alter or create a header template without any lines, background and so forth on it. Just a field.
          Go to Layout, chose the header template, set 'Display Header' to Yes, select Value for the Header Variables and fill in [header_button]. :-)

          jsb

          Comment


          • #6
            I think I didn't get it at all.

            Form is opened but not in new mode, and when inserted I get a Not Found error.
            I basically copy/pasted and changed url, didn't had time to check the code.

            Don't know either, why I can't get pencil/edit icon work. It just not appears.
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment


            • #7
              JSB, has you some sample to see it working and how is done? I got a lot of problems trying to replicate the way you suggested, and I hate a lot editable grids.

              I just want a detail grid, and a "modal" form to add new detail records
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment

              Working...
              X