[Users] Modify record in a store

James McManus jmpmcmanus at gmail.com
Thu Oct 1 01:08:29 CEST 2009


Hi - I would like to modify a record in a store, I created using
GeoExt.data.FeatureStore. The actual store looks like:

        var store = new GeoExt.data.FeatureStore({
          fields: [
             {id: new Date().getTime(), name: 'stfid', type: 'string'},
             {id: new Date().getTime(), name: 'ch_0209_r_tax_val', type:
'float'}
          ]
        });

I thought I could modify it by doing the following:

var record = store.getAt(0);
record.set("name", "id");

which would change stfid to id. But that did not work. I think it is because
I'm not dealing with the presents of "fields".  I've tried a variety of
things without success.  Is there a simple way of doing this?

Thanks
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20090930/d5f74d57/attachment.htm 


More information about the Users mailing list