Extjs 4.1, Making JSON array for Store sync

extjs4.1

Solution

Just set the `allowSingle` config of `Ext.data.writer.Json` to false. As covered here in the docs.

I am pretty sure that this can be done from your proxy config, e.g.:

proxy: {
    type: 'ajax',
    writer: {
        type: 'json',
        allowSingle: false
    },
    api: {
        update: 'Order/ItemUpdate',
        read: 'Order/ItemList',
        create: undefined,
        destroy: undefined
    }
}

Problem

When I sync for edited grid, extjs pass JSON data to Server by AJAX. If I edit multiple row, and sync then it make JSON array. But if I edit just single row, it will pass just a JSON data. So I have some problem with receiving the parameter because the parameter type is vary. My question is, Is it possible to make JSON array date even for single edited grid? If so, how should I do? anybody know please please advice me. [Single] [Multiple] And this is part of grid store, ``` proxy: { type: "ajax", api: { update: 'Order/ItemUpdate', read: 'Order/ItemList', create: undefined, destroy: undefined } } ```

Original source