mercredi 10 décembre 2014

column renderer with data from separate store - out of sync

this is a renderer for a gridpanel column


Code:



renderer: function(v){
var index = this.resellerStore.findExact('id',v);
var rec = this.resellerStore.getAt(index);
return rec.get('name');
},

Problem is that the store for the data loads after it tries to access it, giving undefined errors.

I need the renderer to display the name value in the grid based of the id value in grid ( that gets set by roweditors combobox - or from grids own store).


Any ideas how to solve this?


I tried :



Code:



this.resellerStore.load({
scope: this,
callback: function(records, operation, success) {
if (success) {
this.store.load();
}
}
});

But it still end up giving undefined errors in renderer.



column renderer with data from separate store - out of sync

Aucun commentaire:

Enregistrer un commentaire