wcoykendall
20 Feb 2012, 10:52 AM
Not sure what I am doing wrong, can anyone shed some light as to why the PHP script does not receive anything other than _DC?
var myData = Ext.create('Ext.data.Store', {
storeId:'tableStore',
autoLoad: true,
autoSync: true,
model: 'DataTable',
groupField: 'table',
pageSize: 12,
proxy: {
type: 'ajax',
url : 'getfields.php',
api: {
read : 'getfields.php',
create : 'getfields.php',
update: 'getfields.php',
destroy: 'getfields.php'
},
reader: {
type: 'json',
root: 'items',
totalProperty: 'total'
},
writer: {
type: 'json',
encode: true,
root: 'data'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'Customer Records',
store: myData,
columns: [
{ header: 'ID', dataIndex: 'id'},
{ header: 'Table', dataIndex: 'mtable',editor: { xtype: 'textfield', allowBlank: true}, flex: 1 },
{ header: 'Column', dataIndex: 'mcolumn', editor: 'textfield'},
{ header: 'Data Type', dataIndex: 'mdatatype', editor: 'textfield' },
{ header: 'Length', dataIndex: 'mlength', editor: 'numberfield'},
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
],
dockedItems: [{
xtype: 'pagingtoolbar',
store: myData, // same store GridPanel is using
dock: 'bottom',
displayInfo: true
}],
width: 500,
renderTo: 'grid-example'
});
var myData = Ext.create('Ext.data.Store', {
storeId:'tableStore',
autoLoad: true,
autoSync: true,
model: 'DataTable',
groupField: 'table',
pageSize: 12,
proxy: {
type: 'ajax',
url : 'getfields.php',
api: {
read : 'getfields.php',
create : 'getfields.php',
update: 'getfields.php',
destroy: 'getfields.php'
},
reader: {
type: 'json',
root: 'items',
totalProperty: 'total'
},
writer: {
type: 'json',
encode: true,
root: 'data'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'Customer Records',
store: myData,
columns: [
{ header: 'ID', dataIndex: 'id'},
{ header: 'Table', dataIndex: 'mtable',editor: { xtype: 'textfield', allowBlank: true}, flex: 1 },
{ header: 'Column', dataIndex: 'mcolumn', editor: 'textfield'},
{ header: 'Data Type', dataIndex: 'mdatatype', editor: 'textfield' },
{ header: 'Length', dataIndex: 'mlength', editor: 'numberfield'},
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
],
dockedItems: [{
xtype: 'pagingtoolbar',
store: myData, // same store GridPanel is using
dock: 'bottom',
displayInfo: true
}],
width: 500,
renderTo: 'grid-example'
});