Method Community

 

Updating multiple grid fields as one is edited.

Last post 04-11-2013 8:39 AM by Method_Jason. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-26-2012 9:42 AM

    • viret56
    • Top 75 Contributor
    • Joined on 01-10-2012
    • Virginia
    • Posts 79

    Updating multiple grid fields as one is edited.

    I am customizing the New / Edit Estimate screen.  I have added a Subtotal field to the EstimateLine grid.  Among other actions, I want the Subtotal field to update when I change the Quatity or the Rate.  I have added actions to the Quantity field but no actions are executed.  I see actions for the Item field.  They are executed whenever a different item is selected.

    Why are the Quantity field actions not executing?

  • 01-26-2012 10:11 AM In reply to

    • viret56
    • Top 75 Contributor
    • Joined on 01-10-2012
    • Virginia
    • Posts 79

    Re: Updating multiple grid fields as one is edited.

    Editing is allowed in the grid ('Editing takes place directly in the grid' is selected).  The caption for the edit link is 'Edit...'.  However, I see not 'Edit...' on the grid.  I can edit directly in the fields.  Apparently, javascript is capturing clicks and keypresses while editing the fields.

    Where is the 'Edit...' link?  Why is it not showing on the Grid?

    Is the javascript associated with the field preventing the actions I defined from executing?

  • 01-26-2012 10:24 AM In reply to

    • viret56
    • Top 75 Contributor
    • Joined on 01-10-2012
    • Virginia
    • Posts 79

    Re: Updating multiple grid fields as one is edited.

     The Gain Focus and Lose Focus actions work.  I will do my work there.  I am still curious that the Text Changed actions are not executing.  If you have insight, I would appreciated understanding more of how these grids were programmed.

  • 01-27-2012 10:18 AM In reply to

    Re: Updating multiple grid fields as one is edited.

    viret56-

    viret56:
    Editing is allowed in the grid ('Editing takes place directly in the grid' is selected).  The caption for the edit link is 'Edit...'.  However, I see not 'Edit...' on the grid.  I can edit directly in the fields.  Apparently, javascript is capturing clicks and keypresses while editing the fields.Where is the 'Edit...' link?  Why is it not showing on the Grid?Is the javascript associated with the field preventing the actions I defined from executing?

    I am pretty sure that the Edit... on a grid is an old feature that no longer exists, previosuly you had to click Edit before you were able to edit a grid.

    viret56:
     The Gain Focus and Lose Focus actions work.  I will do my work there.  I am still curious that the Text Changed actions are not executing.  If you have insight, I would appreciated understanding more of how these grids were programmed.

    The Text Changed event only executes when the text is changed to be something different but it seems to not be working on grids. I will put in a ticket for this and update this forum post once I have more information or when the issue is resolved.

    The Text Changed event still works on no grid fields from the looks of it.

    -Michael

    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 04-09-2013 2:42 PM In reply to

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Re: Updating multiple grid fields as one is edited.

    While working with grids, I've noticed that Step 5 of the grid configuration wizard asks about Editing abilities. If you choose "Allow editing directly in the table" it gives you the option to type in an edit caption. However, I don't see where this caption would show up, as was mentioned in a previous post. Is this just something that hasn't been removed yet?

    Also, there are two action events available for editing: After edit and before edit. I'm guessing that because there is no longer a link caption to initiate these events that they are also deprecated. If so, removing them from the wizard may avoid confusion. I did spend a little bit of time programming actions to be performed "after edit" thinking that perhaps a tab out of any cell on the grid following an edit would initiate this actionl. I now realize that it's function may have been tied to this missing edit link. Please let me know if I'm mistaken.

  • 04-10-2013 11:25 AM In reply to

    Re: Updating multiple grid fields as one is edited.

    Answer

    Hi Johnny, 

    You are right in that the Edit... caption no longer exists and should be removed from the Grid Wizard. When Editing takes place directly in the grid is selected you can directly edit the grid without having to click the caption. In my testing, it seems that the Actions Before Edit and Actions After Edit are both triggered when you click Update on the grid or when you save the screen. This seems like it is not the correct behaviour so I will submit a ticket to the team to address the issue and update you when I hear back. 

    Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
  • 04-10-2013 3:48 PM In reply to

    Re: Updating multiple grid fields as one is edited.

    Answer

    I tested this a little further and found there is a difference between Actions Before Edit and Actions After EditBoth actions are in fact triggered by saving or updating the grid, but there is a difference between which values the actions will pull.

    For example, I used a Retrieve Value from Table action on both Actions Before Edit and Actions After EditI retrieved the Quantity from the EstimateLine table of the active recordID on the Estimate screen. If you edit the quantity on the grid and then press Update, the Actions Before Edit will pull the original quantity before the edit and the Actions After Edit will pull the new quantity after the edit. 

    Hope this makes sense. 

    - Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
  • 04-10-2013 9:18 PM In reply to

    • JohnnyW
    • Top 200 Contributor
    • Joined on 01-18-2013
    • Beaumont, TX
    • Posts 21

    Re: Updating multiple grid fields as one is edited.

    Jason,

    This is very helpful. I noticed some weird behavior while retrieving values from a grid row. I would manually change a field, such as quantity, tab out and later call an action to retrieve the value from quantity, which retrieved the previous value. I suppose the solution is to always save and refresh the grid before making a call to retrieve values. Am I making sense?

  • 04-11-2013 8:39 AM In reply to

    Re: Updating multiple grid fields as one is edited.

    Answer

    Yes, this would make sense. You could even put a Save Grid action and a Refresh Grid action in the same action set before you retrieve the values. This might be more efficient because you wouldn't have to remember to click Update or Save

    - Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
Page 1 of 1 (9 items)