Aug 04, 2016, 4:52 PM
Hello!
Indeed, seems I focused on it "the hard way" but skipped a much better approach, which would reduce the compileGrid() function to just:
Indeed, seems I focused on it "the hard way" but skipped a much better approach, which would reduce the compileGrid() function to just:
function compileGrid() {
//buildGrid creates an Ext.grid.Panel
content = buildGrid();
var vp = Ext.getCmp("Panel1");
//Removes previously added objects
var f;
while (f = vp.items.first()) {
vp.remove(f, true);
}
//Adds the created grid to the panel
vp.add(content);
}
Thanks for sharing the outcome!