Method Community

 

Update Grid Action

Last post 04-11-2013 4:30 PM by Method_Jason. 22 replies.
Page 2 of 2 (23 items) < Previous 1 2
Sort Posts: Previous Next
  • 04-10-2013 11:42 PM In reply to

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

    Re: Update Grid Action

    James,

    Thanks for your reply to the earlier post. After reading through the thread, I believe it's possible that some changes have been made within Method actions with regard to the Update button. It appears that the Update button is giving me the same results as a call to the Save Grid action.

    I've also tried combining the Save Grid and Refresh Grid actions as well as using only the Refresh Grid action, but so far I can't discern a difference between the two. So far it appears as if Save Grid = Refresh Grid = Update button.

    Maybe Jason could shed some light on this for us.

    Thanks,

    Johnny

  • 04-11-2013 9:07 AM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Thanks Jason.  I'm sure I tried those actions but I'll try again, there's been a lot of grid enhancements in the last year or so.  I was trying to update the grid, then insert a new row based on text change or other cell editing by the user. The results were not predictible.  Somewhat understandably as the grid may be thinking the user is still in edit focus on a cell, etc. depending on cursor location when the text change event fires, etc.

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 04-11-2013 9:17 AM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Oh, and yes, I never really sorted out the difference between refresh, update, and save and I ended up just using save as a heavy hammer to get the grid back to where I needed it for the next user or action sequence operation.  The documentation has not tended to provide detailed technical information as to how to choose among those actions.

    Also, my suspicion is that some of those Grid actions were originally coded expecting a performance improvement if Saves are avoided.  Refresh or Update may have done something within the context of the browser cache of the grid contents without going to the server and back.   But, the Save action is so fast that I see no performance problem using Saves recursively in a grid edit session with a user interaction.

    The more experience I have with screen design for user interaction the more I like frequent saves.  Getting users to understand their changes are not committed until a save is performed harder to do than to allow them to change something after the save occurs and I tend to see some odd results when a full save isn't performed at key points.  There are some values like Totals on Orders and Invoices that only come from Quickbooks.  When a user enters a Quantity and a Price, the Amount is always a calculated value and the save must synch back to QB to get the result.  This is a nice feature as QB is holding onto some data integrity for certain financial calculations.


    Anyway, for what it's worth, I think full saves are good and folks shouldn't be afraid to use them liberally.

    Cheers,


    James

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 04-11-2013 11:00 AM In reply to

    Re: Update Grid Action

    Thanks for all of the insight! Here are my thoughts:

    Refresh Grid action: This action refreshes the grid but does not save it. For example, if your grid is editable and you make a change in the grid without saving, the refresh grid action will refresh the grid to the previous state before the edit. 

    Save Grid actionThe grid will not save unless this action is performed. If you make a change in an editable grid and then change the active record without saving, you will lose the change and it will revert back to the original state. 

    Update link: This is simply a Save and Refresh grid action combined.

    I would suggest using a Save all Sections action before you leave the screen to make sure that the entire record is saved.

    - 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-11-2013 12:11 PM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Jason,

    Have you tested this to see if it works this way?  This thread was started when I found those Actions did not work as documented or expected.  I haven't gone back to try these again.  I would really like to be able to use Save Grid Row in conjunction with Insert New Row.

    James

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 04-11-2013 1:54 PM In reply to

    Re: Update Grid Action

    James, 

    I have tested it and it works the way I described earlier. The Save Grid Row action no longer exists, it has been replaced by Save Grid. Let me know if you still experience unexpected behaviour with these actions but I think you'll find that the behaviour is different then from when you started this thread. 

    - 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-11-2013 2:22 PM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Update Grid Action

    Cool.  I'll give it a try.

    James

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 04-11-2013 4:30 PM In reply to

    Re: Update Grid Action

    JohnnyW:

    Is it possible to dynamically change the ability to edit rows based on user or role? Or would this require a completely new grid?

    Sorry Johnny I must have missed this post.

    Unfortunately, this is not possible. Like you said, you would have to create two grids, one editable and one not. From here you may set actions that will hide/show the object/section depending on if the user is the admin or not. In my screenshot below, I put the Show/Hide Field/Object action inside the conditional statement. Hope this helps!

    - 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 2 of 2 (23 items) < Previous 1 2