- Código: Seleccionar todo
AjaxRowExpander = function(config){
AjaxRowExpander.superclass.constructor.call(this, config);
this.enableCaching = false;
}
Ext.extend(AjaxRowExpander, Ext.grid.RowExpander, {
getBodyContent : function(record, index){
var body = '<div id="tmp' + index + '">Loading... <img src=".../images/ajax-loader.gif"/></\div>';
InterfaceJS.metodoRemoto( datosAlServer, {
callback: function(array) {
if(array != null && array.length > 0 && array[0] != null && array[0] == 0) { // si el codigo es 0 exito
Ext.getDom('tmp' + index).innerHTML = '<p style="margin-left:70px"><b>a:</\b> '+ array[0] +'</\p><br>';
}
}
});
return body;
},
beforeExpand : function(record, body, rowIndex){
if(this.fireEvent('beforeexpand', this, record, body, rowIndex) !== false){
body.innerHTML = this.getBodyContent(record, rowIndex);
return true;
} else{
return false;
}
}
});
- Código: Seleccionar todo
var expander = new AjaxRowExpander({});
- Código: Seleccionar todo
var gridC = new xg.GridPanel({
store: storeC,
cm: new xg.ColumnModel([
expander,
Espero les sirva! saludos


