Local editing in Ext grid

I use Ext Ext.grid.EditorGridPanel to create a grid and use a storage array with local data to populate the rows in the grid. When I edit the values ​​in the grid, they show a small red triangle in the upper left corner, and the storage data is not updated.

So how can I edit local data in EditorGridPanel?

I see a similar problem in the Ext Editor Grid Example , although this example also sets the URL, see image below.

enter image description here

Decision. Since I just needed to save the changes locally, I just did the following.

settingsGrid.on('afteredit', function(evt){
settingsGrid.store.commitChanges()
})

It fixes the problem and all user-edited data is happily updated in local storage.

+3
2

, . , .

, . DataWriter . !

: , :

  • getModifiedRecords() - .
  • commitChanges() - .
  • rejectModifiedRecords() - .

- . , , .

+5

Grid Example EditorGridPanel (. edit-grid.js ). , .

, restful: true, ArrayStore. data, url, .

+1

All Articles