O'Reilly logo

Ext JS 3.0 Cookbook by Jorge Ramon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performing batch uploads of data edited with a grid

This recipe illustrates how a grid component and its data store can be configured so that record changes are locally cached in the store and automatically sent to the server as a batch at a later time.

Multiple edits in the Customers grid can be batched and sent to the server by clicking on the Save Changes button:

Performing batch uploads of data edited with a grid

How to do it...

  1. Create a data store for the customers' information:
    var customersStore = new Ext.data.JsonStore({
    url: 'grid-batch-save.php',
    root: 'customers',
    idProperty: 'ID',
    successProperty: 'success',
    fields: ['ID', 'name', 'address', 'zip code', 'phone', 'city'],
    writer: new Ext.data.JsonWriter(), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required