View Full Version : Gridpanel is loading before store sometimes, only in Chrome

10 Apr 2014, 10:36 AM
I have a gridpanel where some of the fields are keys for an enum. I want to display the value of the enum, not the key. What I was doing before was, on render, replace the key of the dataindex with the value.

header: 'A Column', dataIndex: 'aColumn', flex: 1,
renderer: function(value){
var aColumnStore = EJJ.application.getStore('aColumnStore')
return aColumnStore.getById(value).data.desc
return value

However, what I'm finding is that, when the page is refresh, sometimes the store doesn't load, or doesn't load in time. I'm trying to find a workaround for this, but can't find anything reliable. Is there a way I can tell the controller to wait until the table is fully rendered, then change the value of those columns once the store is loaded?

This only happens in Chrome. Not in Firefox.

10 Apr 2014, 11:28 AM
My solution for this is to have joined field that return the description from the server instead of the value and then trying to render the associated value. This also allows for you to search on this data easier as well.

10 Apr 2014, 12:10 PM
one way could be to keep grid hidden when created (hidden: true) and then on the load event of your store, call grid.show();