I've got a submit button in my FormPanel bound to a grid. Everything works, except for the update (submit) button. It appears that the reload data stage works, but since it's not updating the database, it spits out the old data.

Firebug doesn't give me any errors.

Am I overlooking something?

Thanks!

Code:
var updateButtonHandler = function saveRecord() {
	Ext.Ajax.request({   
      waitMsg: 'Please wait...',
      url: 'database.php',
      params: {
	     task: "UPDATE",
		id: id.value,
			WorkFors: WorkForsField.getValue(),
			SiteIDs: SiteIDsField.getValue(),
			TNC: TNCField.getValue(),
			NetX: NetXField.getValue(),
			Envestnet: EnvestnetField.getValue(),
			NMCIR: NMCIRField.getValue(),
			Morningstar: MorningstarField.getValue(),
			Entrust: EntrustField.getValue(),
			Comments: CommentsField.getValue(),
			SB: SBField.getValue(),
			Wsign: WsignField.getValue(),
			Email: EmailField.getValue(),
			DN: DNField.getValue(),
			Jack: JackField.getValue()
      }, 
      success: function(response){							
         var result=eval(response.responseText);
         switch(result){
         case 1:
            DataStore.commitChanges();
            DataStore.reload();
            break;					
         default:
            Ext.MessageBox.alert('Uh uh...','We couldn\'t save him...');
            break;
         }
      },
      failure: function(response){
         var result=response.responseText;
         Ext.MessageBox.alert('error','could not connect to the database. retry later');		
      }									    
   });   
  }
Code:
 var gridForm = new Ext.FormPanel({
        id: 'RequestInput',
        frame: true,
        labelAlign: 'left',
        title: 'Technology',
        bodyStyle:'padding:5px',
        width: 1024,
        layout: 'form',    // Specifies that the items will now be arranged in form or columns
        buttons:[{text:'Update', handler:updateButtonHandler}],
		items: [{
            columnWidth: 0.4,
            layout: 'fit',
            items: {
                xtype: 'grid',
                ds: DataStore,
                cm: colModel,
                sm: new Ext.grid.RowSelectionModel({
                    singleSelect: true,
                    listeners: {
                        rowselect: function(sm, row, rec) {
                            Ext.getCmp("RequestInput").getForm().loadRecord(rec);
                        }
                    }
                }),
//                autoExpandColumn: 'StartDate',
                height: 200,
                title:'Select a record to edit',
                border: true,
                listeners: {
                    viewready: function(g) {
                        g.getSelectionModel().selectRow(0);
                    } // Allow rows to be rendered.
                }
            }
        },
		{

//            columnWidth: 0.6,
            xtype: 'fieldset',
            labelWidth: 90,
            title:'Edit details',
//            defaults: {width: 140, border:false},    // Default config options for child items
            autoHeight: true,
            bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;',
            border: true,
            style: {
                "margin-left": "10px", // when you add custom margin in IE 6...
                "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0"  // you have to adjust for it somewhere else
            },
				items: [{
					layout: 'form',
					border: true,
					items: [PhoneField, SiteIDsField, WorkForsField]	
				},{
					layout: 'form',
					border: 'true',
					items: [SBField, WsignField, EmailField]
				},{
					layout: 'form',
					border: 'true',
					items: [DNField, JackField]
				},{
					layout: 'form',
					border: 'true',
					items: [CcureextField, CcurepinField]	
				},{
					layout: 'form',
					border: 'true',
					items: [CcureextField, CcurepinField]	
				},{
					layout: 'form',
					border: 'true',
					items: [TNCField, NetXField, EnvestnetField, NMCIRField, MorningstarField, EntrustField]	
	            },{
					layout: 'form',
					border: 'true',
					items: [CommentsField]
				
       
            }],
			}
			
		],
        renderTo: bd


	    });
      //  gridForm.on('afteredit', saveRecord)
});