Results 1 to 2 of 2

Thread: Grid and batchSave

  1. #1
    Sencha User MiamiCoder's Avatar
    Join Date
    Mar 2009
    Location
    Miami, FL
    Posts
    144

    Default Grid and batchSave

    Can anybody provide a simple example highlighting the use of batchSave?

  2. #2
    Ext JS Premium Member dj's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    573

    Default

    Sorry no example, but... You have seen the writer example in the Ext 3 download? Just change batchSave to true there and see for yourself.

    I use batchSave with an Ext.Direct proxy/writer in a situation where I want the user to be able to create/modify several records at once and when he is done, commit them all at once -- or cancel his modifications. It's useful for master-detail kind of relations.

    Here is the handler for the save button:
    Code:
    onSaveLinkBtnClick: function(){
            if (this.linkForm.links.store.save()) {
                this.linkForm.hide();
            }
            else {
                Ext.MessageBox.alert('Error', 'There are validation errors');
            }
        }
    Daniel Jagszent
    [email protected]??gsze?t.de <- convert to plain ASCII to get my email address

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •