Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Update multiple grids

    Hi,
    I need to update multiple grids using grid.saveAllEdits() method.
    So in case of only 1 grid I can simply add a callback to wait till save completion and notify user. But in case of 2 grids, I am not sure how to check this. I cannot place save # 2 inside Save #1 because if there is nothing to save in GridA the second save operation will not be even called.


    Code:
    GridA.saveAllEdits(new Function() {
    	public void execute() {
    		//some code
    	}
    }); 
    
    GridB.saveAllEdits(new Function() {
    	public void execute() {
    		//some code
    	}
    });  
    
    // if GridA and GridB saved
    SC.say("Saved Successfully.");
    I am using SmartGWT 2.2 and Firefox browser.
    Any suggestions please.
    Thanks.

    #2
    Use queuing (see RPCManager.startQueue()), and pass the callback to second grid, or to the first grid if there are no edits in the second (use grid.hasEdits() to check).

    Comment


      #3
      but is it available in LGPL, based on your comments :
      startQueue()) are non-functional with the LGPL version.

      Comment


        #4
        You're a professional developer, you should be using Pro or should purchase support if you need help solving this kind of problem with the free product.

        Comment

        Working...
        X