Hello !
I have a jsonStore:
Code:
var store = new Ext.data.JsonStore({
url: '../datenbank.php',
root: 'data',
idProperty: 'id',
totalProperty: 'count',
fields: ['id', 'date']
});
store.load();
I will add a record to this store:
Code:
var form = new Ext.form.FormPanel({
width: 400,
height: 100,
title: 'Eingabe',
renderTo: 'form',
items: [{
xtype: 'datefield',
fieldLabel: 'Sperrtage'
}],
buttons: [{
text: 'eintragen',
listeners: {
click: function(){
// get the first rcord
var currentRecord = store.getAt(0);
// clone the record
var newRecord = currentRecord.copy();
// set new value in the new record
newRecord.set('100','25.10.2011');
// add the nwe record to the store
store.add(newRecord);
// confirm changes
store.confirmChanges();
}
}
}]
});
The first load of the store works fine.
When i add the record to the store i get an error.
Your sincerly
Stephan