View Full Version : How stop grid render until store load

6 May 2010, 1:50 PM
Hello guys, i need help with this:

I need a grid, but i need send something, for example: a text for emptyMsg, from store load. the problem is: the grid reder and the store load asyncronus, so...in the moment to create the bbar pagingtoolbar, the store not load yet.

I think need a event o override something to STOP the render grid (or creation) UNTIL the store load...

some body can helpme ??? please!


some code

MyGridPanel = function(config){
Ext.apply(this, config);

var store = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({url: config.url, method: 'POST'}),
autoDestroy: true,
remoteSort: true,
fields: []

columnLines: true,
stripeRows: true,
bufferResize: false,
trackMouseOver: true,
layoutConfig: {deferredRender: false},
selModel: new Ext.grid.RowSelectionModel(),
store: store,
columns: [],
viewConfig: {
onDataChange: function(){
bbar: new Ext.PagingToolbar({
pageSize: 25,
store: store,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: store.reader.jsondata.emptyMsg //<- send from (php) json, for EN = No topics to display , to ES = Nada para mostrar

var cpanel = Ext.getCmp(this.ownerCt.id);
cpanel.dataPanel = this.id;

Ext.extend(MyGridPanel, Ext.grid.EditorGridPanel, {
initComponent : Ext.grid.GridPanel.prototype.initComponent.createInterceptor(function (){
this.store.on('load', function(){
?????????? something like that maybe to load params to grid from json before render???????


initEvents: function(){


Ext.reg('MyGridPanel', MyGridPanel);

6 May 2010, 6:42 PM
You can use Javascript Continuations, first load the store before instantiating the component.

9 May 2010, 7:47 AM
:( but how? can u help me a little more please? tnks

9 May 2010, 7:55 AM
You don't need to stop it rendering. Rendering a grid is different from updating its rows.

It will update its rows on store load.