Reputation: 15039
I have a gridpanel
that I build dynamically from server.
The result is the following image:
The code that I'm using after I get the data from the server is:
success: function(response, opts) { var obj = Ext.decode(response.responseText); if (obj.success) {
gridStore.model.setFields(obj.data.metaData.fields);
grid.reconfigure(gridStore, obj.data.metaData.columns);
gridStore.loadRawData(obj.data.storeData, false);
}
},
Upvotes: 1
Views: 649
Reputation: 1951
Try suspendLayouts and suspendEvents before re-configuring the grid and turn it on later
success: function(response, opts) {
var obj = Ext.decode(response.responseText);
if (obj.success) {
Ext.suspendLayouts();//Suspending layout should fast things up
gridStore.suspendEvents(); //If needed suspend the events too
gridStore.model.setFields(obj.data.metaData.fields);
grid.reconfigure(gridStore, obj.data.metaData.columns);
gridStore.loadRawData(obj.data.storeData, false);
Ext.resumeLayouts(true);
gridStore.resumeEvents();
}
}
Upvotes: 1