Reload grid with entirely different XML


Hi



i render the grid with an XML fetched from server. After this if i set different configuration(based on which the grid is got from the server), and click on a button i want the grid to be reloaded with new XML. i cleared the gris and set the grid object to null. But the new grid is not loaded.



Is there anything i am missing out here.



Please help



Thank you



 

If you just need to reload data you can use
    grid.clearAll()
    grid.loadXML(url);

If you plan to reinit structure as well
    grid.clearAll(true)
    grid.loadXML(url);


If you need to fully destroy grid object
    grid.destructor();
    grid = new …

It works … thanks a lot.