I'm attempting to deploy an editable grid. I'm getting the error
Uncaught TypeError: Object [object Object] has no method 'getModifiedRecords'
I must have left something out somewhere. (all i did was copy and paste from Lab19 of class VV202)
Uncaught TypeError: Object [object Object] has no method 'getModifiedRecords'
I must have left something out somewhere. (all i did was copy and paste from Lab19 of class VV202)
Code:
//controller code snippet: onSaveTaxIdButton: function() { var changedRecords = this.getStore('AP1099s').getModifiedRecords(); if (changedRecords.length > 0) { var recs = Ext.Array.pluck(changedRecords, 'data'); Ext.getBody().mask(); Ext.Ajax.request({ url: 'vvcall.pgm', params: { pgm: 'ap1099zr', action: 'updateTaxID', changes: Ext.encode(recs) }, scope: this, success: function(response) { Ext.getBody().unmask(); var d = Ext.decode(response.responseText); if (d.SUCCESS === '1') { this.getStore('AP1099s').load(); Valence.util.msg('Saved', d.NUMBERSAVED + ' Tax ID Changes'); } else { Ext.Msg.show({ title: 'Error', msg: 'An error occurred....', icon: Ext.Msg.ERROR }); } } }); } }
Code:
//view snippet...... initComponent: function() { var me = this; Ext.apply(me, { store: 'AP1099s', forceFit: true, stripeRows: true, frame: true, viewConfig: { emptyText: '<b><br><br><br><center>*** Enter Search Criteria ***</center></b>', deferEmptyText: false }, columns: me.buildColumns(), tbar: me.buildTbar(), dockedItems: me.buildDockedItems(), menu: me.buildMenu(), plugins : this.buildPlugins() }); buildPlugins: function() { return [Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 })]; buildColumns: function() { return [{ dataIndex: 'A99FID', text: '<b>FED ID</b>', width: 9, align: 'left', editor : { xtype : 'textfield' }
Comment