PDA

View Full Version : Problem refreshing EditorGrid



lguzman
21 Sep 2010, 7:38 AM
Hello

I have a problem trying to refresh the grid info on my component, i chek the response from the server with firebug and the info does filter as i want when i call the store.reload() function, but the display does not refresh


PreUi = Ext.extend(Ext.grid.GridPanel, {
height: 640,
width: 1145,
region:'center',
margins: '0 5 5 5',
store: store,
plugins: [editor],
initComponent: function() {
this.columns = [
{
id: 'Periodo',
header: 'Periodo',
dataIndex: 'Periodo',
width: 60,
editor: new fm.TextField({
allowBlank: false,
readOnly: true
})
}, {
header: 'Cuenta',
dataIndex: 'Cuenta',
width: 75,
editor: new fm.TextField({
allowBlank: false,
readOnly: true
})
},{
header: 'Descripcion',
dataIndex: 'Descripcion',
width: 260,
editor: new fm.TextField({
allowBlank: false,
readOnly: true
})
}
],
this.tbar = [{
xtype: 'combo',
store: st,
displayField: 'Filtro',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
emptyText:'Seleccione un filtro',
selectOnFocus:true,
listeners: {
select: function(f,r,i){
Ext.Ajax.request({
url:'Presupuesto.jsp',
method: 'POST',
params: {
task: "4",
Filtro: i.toString()
},
success: function (){
store.reload({ //Reload the grid
callback: function(){
Ext.Msg.show({
title: 'Carga completa',
msg: 'La informacion se ha cargado con exito.',
modal: true,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
})
}
})
}
})
}
}
}
],
PreUi.superclass.initComponent.call(this);
}
});

am i missing something?

Thanks in advance

lguzman
21 Sep 2010, 9:52 AM
SOLVED!!!!!
I didn't update my params, so same information was reloading


store.reload({params: {
task: "4",
Filtro: i.toString()
},
callback: function(){
Ext.Msg.show({
title: 'Carga completa',
msg: 'La informacion se ha cargado con exito.',
modal: true,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
})
}
})