A button handler inserts a new record into store. This newly created record gets a temporary negative id.
When saving the record to the database the server returns the new autoincremented id. This autoincremented id will replace the negative temporary id.

This is working perfectly when I'm using Ext.data.Store, but with Ext.data.GroupingStore I get undefined. I have read the code over and over and can't find any kind of typo.

Think this code snippet is enough:
Code:
var dr = Ext.data.Record.create([
    {name: 'id', type: 'int'},
    {name: 'head'}
]);

var ds = new Ext.data.GroupingStore({
    url: '/items/get',
    reader: new Ext.data.JsonReader({
        root: 'rows',
        totalProperty: 'count',
        id: 'id'
    }, dr),
    remoteSort: true,
    groupField: 'head',
    sortInfo:{field:'id', direction:'ASC'}
});

var dummyID = -1;
var gridCmp = new Ext.grid.EditorGridPanel({
    ...,
    ...,
    tbar:[
        {
            text:'Create',
            handler: function(){
                var p = new dr({
                    head: 'fooBar',
                });
                gridCmp.stopEditing();
                ds.insert(0, p);
                gridCmp.startEditing(0, 2);
                p.id = dummyID--;
                alert(p.id); // ALERTS -1
                alert(ds.getById(-1)); ALERTS UNDEFINED
            }
        }
    ]
});
Like I said, this is working with my other grids using Ext.data.store.

Any help is much appreciated!