PDA

View Full Version : [SOLVED] UPDATE row/record in grid in extjs 3



shahdollie
13 Sep 2010, 4:29 PM
hi everyone


I have a form and below that a grid. When a add some data in form and click "Insert", it inserts data in grid. When i double click on grid all the data from grid fills up in form. I then change the data. (similar to Ext.data.DataWriter Example)


The problem is I am not able to "UPDATE" row in grid. I am not using datawriter class. But I just simply want to update my grid row with new data.


Is there a way to do this???????


Please help me....
Regards

shahdollie
13 Sep 2010, 5:36 PM
Hi everyone...


I finally found answer to my question....



its Record class's method:
set( String name, String/Object/Array value ) : void


So you can use it like this:

record.set('fieldname', 'newvalue');


Thanks everyone....
Regards

salih
13 Sep 2010, 9:19 PM
I am not an expertize in this field.There may be better replies.In mean time you could check the following sample.
Let 'store' be your store
var records = [].concat(store.allData.items);

for(var j=0; j<records.length; j++){

rec=records[j];
rec.set('isSave','N');

}