Results 1 to 3 of 3

Thread: Batch Update with store.sync()

  1. #1
    Sencha User
    Join Date
    Jan 2017
    Posts
    10

    Default Batch Update with store.sync()

    Hi, I have a grid bound to a store, and I'm doing a store.sync to update multiple records. The store is calling a .net/c# controller using ExtDirect (Direct.Main.UpdateAgreementType). Here's my store:

    Code:
    Ext.define('TP.store.AgreementTypes', {
        extend: 'Ext.data.Store',
        requires: [
            'TP.model.AgreementType'
        ],
        model: 'TP.model.AgreementType',
        alias: 'store.AgreementTypes',
    
    
        proxy: {
            
            type: 'direct',
            api: {
                read: 'Direct.Main.GetAgreementTypes',
                update: 'Direct.Main.UpdateAgreementType',
                create: 'Direct.Main.InsertAgreementType'
            },
            writer: {
                writeAllFields: true,
                encode: false
            },
        }
    
    
    });
    Right now, the sync is sending all the updated records in one batch. Is there a config that will enable it to send one record at a time? I'm having trouble reading the batch on my .net controller. Thanks.

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,006
    Answers
    5

    Default

    Hi there- Unfortunately I do not have the answer for you but I have asked that a member of the support team reach out to you and provide some assistance. Thank you so much for your patience.

    Michele

  3. #3
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    569
    Answers
    7

    Default

    Hello,

    store.sync is used for batch updates. If you need to send single records , you will have to do it manually . You will have to use getModifiedRecords and getRemovedRecords to get all modified/removedrecords. This will give you array, you will need to take single records from that array and call your direct method.

    Regards,
    Kumar
    Sencha Support

Similar Threads

  1. Replies: 3
    Last Post: 1 Nov 2013, 10:39 AM
  2. Replies: 3
    Last Post: 19 Nov 2012, 11:43 AM
  3. Replies: 3
    Last Post: 9 Nov 2012, 4:46 AM
  4. Looking for proxy batch/store sync documentation
    By GuillaumeF in forum Ext: Q&A
    Replies: 0
    Last Post: 7 Sep 2012, 11:34 PM
  5. how to manipulate batch on store sync?
    By lfs2008 in forum Ext: Q&A
    Replies: 2
    Last Post: 7 Jun 2012, 2:27 PM

Tags for this Thread

Posting Permissions

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