View Full Version : Editor grid staying dirty

31 Oct 2010, 4:20 PM
Having some trouble getting my editor grid working. I've been looking at this all day and I know I am missing something small. The grid loads, I can click and edit the record and have a request go to the server and have JSON returned but the record stays dirty. Here is what I am working with:

Initial JSON used to load store:

"status" : "Subscriber",
"user_id" : "3",
"last_name" : "Doe",
"first_name" : "John"

items: new Ext.grid.EditorGridPanel({
height: 250,
clicksToEdit: 1,
store: new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
api: {
read: '../xxxx',
update: '../xxxx'
writer: new Ext.data.JsonWriter({
encode: true,
writeAllFields: true
root: 'rows',
idProperty: 'user_id',
successProperty: 'success',
fields: [
autoLoad: true,
autoSave: true,
nocache: true,
store: 'membership_updater'
loadMask: true,
viewConfig: {
forceFit: true
cm: new Ext.grid.ColumnModel([
{header: 'First Name', sortable: true, dataIndex: 'first_name'},
{header: 'Last Name', sortable: true, dataIndex: 'last_name'},
{header: 'Status', dataIndex: 'status', editor: new Ext.form.ComboBox({typeAhead: true, store: new Ext.data.ArrayStore({fields: ['id','displayText'],data: [[1, 'Member'], [2, 'Subscriber']]}),typeAhead: true, triggerAction: 'all',lazyRender:true,valueField: 'id', displayField: 'displayText'})}
JSON returned after cell edit:

"status" : "Member",
"user_id" : "3",
"last_name" : "Doe",
"first_name" : "John"
Any direction on where I am going wrong would be great, thanks guys.

31 Oct 2010, 6:29 PM
Listen to the exception event of the store to see if there's anything wrong when trying to parse the data...