Hi all,
I think I have a simple problem, but I'm to silly to solve it ^^.
I have an actioncolumn in an gridpanel that is provided by an MVC-structure with a store.
The definition of the column is:
Code:
{
xtype: 'actioncolumn',
text: 'prüfen',
width: 45,
align: 'center',
items: [
{
handler: function(view, rowIndex, colIndex, item, e, record, row) {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //beacuse January would be 0
var yyyy = today.getFullYear();
if (dd<10) {
dd = '0'+dd;
}
today = yyyy + '-' + mm + '-' + dd;
view.getStore().getById(record.data.id).data.referenzecho_lastchange = today;
view.getStore().fireEvent('datachanged',{});
view.getStore().commitChanges();
view.getStore().sync();
view.refresh();
},
icon: 'extjs/examples/desktop/images/gears.png',
}
]
},
I simply want to change a field of the actual record of the store to the current date. But I cant get the store save my changes. What's my problem here?`I dont understand it.
Thank a lot,
Tobias