PDA

View Full Version : LoadRecords problem



vicvolk
19 Jul 2012, 12:58 AM
Hi, guys! I try to use LoadRecords method inside my ajax call in order to reload a particular row in my grid panel. However Firefox returns an error a[c].join is not a function.

The usage is following. I have an editable grid, when I edit a particular cell in my grid I send an ajax call to the server, which implements updating. It should be focused that it updates not only one cell, but also some other cells in the same row.

So, this is my ajax call


Ext.Ajax.request({
url:url,
loadMask: true,
params : { action : 'edit_field', id_object: <?php echo $idd; ?>, id_field: id_field, id_attr: id_master, val:rec.get(attr)},
method: 'POST',
success: function ( result, request ) {

//var json = result.responseText;

//here as a response I get in json format my updated row in a grid - json
//and try to use loadRecords method like this - Ext.getCmp('grid').getStore().loadRecords(json);



},
failure: function ( result, request) {
}
});

What is my mistake? Probably there is another way of implementing this. I mean - to reload a single row in a grid, like we do it with a single node in tree panel: tree.getStore().load({node: 1})

mitchellsimoens
25 Jul 2012, 10:28 AM
loadRecord is going to expect a record not a string

mitchellsimoens
25 Jul 2012, 10:29 AM
Why not use a proxy ont he store to load the data?