May 26, 2011, 8:51 AM
[CLOSED] record.fields is undefined after store.add(new Ext.Record(...))
Hi,
I just want to post a problem and a solution for maybe helping others who will run into the same problem.
If you add records ot a store like this:
Changing the code to the following lines will fix the problem:
Martin
I just want to post a problem and a solution for maybe helping others who will run into the same problem.
If you add records ot a store like this:
grid.store.add(new Ext.data.Record({ id: entries[i].id, text: entries[i].text, tableUid: entries[i].tableUid, dataId: entries[i].dataId }));
I got the following exception "record.fields is undefined" after I updated from SVN (I guess its a problem with changes on ExtJS, not Ext.NET) since several months.Changing the code to the following lines will fix the problem:
var ObjectRecordType = Ext.data.Record.create(['id', 'text', 'tableUid', 'dataId' ]);
var rec = new ObjectRecordType({ id: entry.id, text: entry.text, tableUid: entry.tableUid, dataId: entry.dataId })
grid.store.add(rec);
HTH,Martin
Last edited by geoffrey.mcgill; May 26, 2011 at 10:49 PM.
Reason: [CLOSED]