Our pure JavaScript Scheduler component


Post by brucelee »

since in Version 2.x 'idField' is removed how am I supposed to set a unique identifier on data (for updating) if I'm not able to subclass Model since I'm using IE

Setting a id field which is a duplicate of a different field seems unreasonable, since the amout of data we are using is huge and sending the same data twice impacts the Performance

without duplicating and just using
 field: [{name: 'id', dataSource: 'myId'}] 
actually renames the field to id so myId is not usable anymore

Post by pmiklashevich »

Please try to set it as a property to your Model class:
Model.idField = 'myId';

Pavlo Miklashevych
Sr. Frontend Developer


Post by brucelee »

As I said I don't have a model class. I'm using IE

Post by johan.isaksson »

Hi,

In IE it should be possible like this:
store.modelClass.idField = 'myId';
But, seems we have a bug with this approach. Ticket on getting it fixed: https://app.assembla.com/spaces/bryntum/tickets/8412

Until the issue is resolved, as a workaround you should still be able to specify idField on the Store. It was deprecated but code is not yet removed:
grid.store.idField = 'myId';
grid.store.data = [
    { myId : 1, name : 'Test'}
];
Best regards,
Johan Isaksson

Post Reply