this.cellType null or not an object : DHTMLX Grid

Hi,
When i use the following code multiple times. first time it works. and the next time it says this.cellType null or not an object in ie. In FF it says load XML error.I checked xml by running in the both (IE/FF)browsers and that shows right xml in the browser .

function createGrid(){

if(grid==null){ 
   grid = new dhtmlXGridObject('gridbox');   
}
grid.setImagePath("dhtmlx/dhtmlxGrid/codebase/imgs/");
grid.setHeader("ID,Existing Sheets"); 
grid.setInitWidths("50,230"); 
grid.setColAlign("left,left"); 
grid.enablePaging(true,3,null,"pagingControlsContainer",true,"pagingStateContainer");
grid.setSkin("light"); 
grid.setPagingSkin("bricks");
grid.init(); 
//grid.clearAll();
//alert("AutoNameAjax.jsp?xmlfor=grid&reasonid="+document.getElementById("idx").value);
grid.loadXML("std.xml"); 

}

XML:

<?xml version="1.0" encoding="UTF-8"?> 1 Model 1 2 Model 2 3 MOdel 3

Thanks.

You should define columns types with setColTypes() method. docs.dhtmlx.com/doku.php?id=dhtm … etcoltypes

Excellent . thanks.