PDA

View Full Version : Store Insert data



andreacfm
17 Sep 2009, 11:43 AM
Hi ,

I am using a store.insertData() statement to add record to a grid.

shopStore.insert(0,record);
The issue is this.
I add the record and I see frid updating with my new record with correct datas but if I try recall later the same record from the store by id record do not exixts....

var record = shopStore.getById(id);
I see record in firebug and displaying in the grid but I cannot use that.

Any suggestion??

evant
17 Sep 2009, 4:37 PM
How are you declaring the record? Note that the second parameter to the record constructor is the id.

andreacfm
17 Sep 2009, 11:04 PM
Thanks.

That was the issue.
I was creating a new record from a form data just passing the data and using a previous prepeared model.
I forgot that model, in any other cases, is used by a reader that apply the idProperty.
Now is working.

Thanks.