Well,
It seems that it doesn't work.
I added this parameter to my grid and wrote an alert:
Code:
kmxgz.ordercmpappro.prototype.run = function () {
var _self = this;
var myViewConfig = {
onDataChange: function(store){
alert('onDataChange');
_self.kmx_cmpappro_store.loadData(store.reader.jsonData);
_self.kmx_order_store.loadData(store.reader.jsonData);
this.constructor.prototype.onDataChange.apply(this, arguments);
}
};
// -----------------------------------------
// LAST STEP: render the grid, NOT BEFORE!
// -----------------------------------------
// load combobox stores BEFORE grid
this.kmx_cmpappro_store.load({
callback: function() {
_self.kmx_order_store.load({
callback: function() {
kmxgz.factory.kmxEditorGridPanel.prototype.run.call(_self, myViewConfig);
}
});
}
});
};
When I create the grid:
_
Code:
[...]
alert(print_r(myViewConfig)); <== I can see the content of the object with this alert
kmx_object_grid = new Ext.grid.EditorGridPanel({
id: _self.kmx_gridpanel_id
, title: _self.kmx_grid_title_text
[...]
, viewConfig: myViewConfig
[...]
});
But when I changed something in the grid or when I click on the reload/refresh button, I can see the Ajax call to reload the data for the grid but not the ajax calls for the combobox.
I think I don't have a special big application, just an application: I mean it's probably a common issue no?
Did somebody meet that before?
Is there anything in EXTJS to solve that?
I think about the callback: but how to use it in this case?
Thank you