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

Automatic uploading of data edited with a grid

The Customers grid in this recipe illustrates how a grid component and its data store can be configured so that the data edited in the grid is automatically propagated to the server.

In case of changes to any editable cell, the updated value will be uploaded to the server:

Automatic uploading of data edited with a grid

How to do it...

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

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