PDA

View Full Version : Edit record of store but edited record is not reflected in store



wasima
5 Aug 2013, 6:29 AM
Hi,

I have store ,i read store and based on some criteria i edit record of store , but this edited record is not getting reflected in store .

this.store.loadData(data);
this.store.each(function(record){
if(record.data.srcName = = .name) {
record.data.srcName = "* "+record.data.srcName;
}
});
This store is attached to a grid , but the record i edited is not getting reflected it still shows old record data;

Thanks in advance.

aaugen
5 Aug 2013, 11:59 PM
Hi,

Try to use get and set model methods like this :


if(record.get('srcName') === 'xxxx') {
record.set('srcName', '* ' + record.get('srcName'));
}

When you use this methods, your modifications is reflecting on your grid.