Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stefan on May 11, 2009 23:02
open dhtmlx forum
Error Type Configuration: Incorrect Cell Type

We are experimenting with the free version, to buy eventually a pro version.

When loading the grid with these data, we are getting the JavaScript error "Error Type Configuration: Incorrect Cell Type" on loading the xml:


<?xml version="1.0" encoding="UTF-8"?><rows><head><column width="100"><![CDATA[Materialnummer]]></column><column width="100"><![CDATA[Datum]]></column><column width="100"><![CDATA[Standort]]></column><column width="100"><![CDATA[Charge]]></column><column width="100"><![CDATA[Split]]></column><column width="100"><![CDATA[Menge ITH 2]]></column><column width="100"><![CDATA[Wert ITH 2]]></column><column width="100"><![CDATA[Menge ITH]]></column><column width="100"><![CDATA[Wert ITH]]></column></head><row><cell><![CDATA[ <div align="left">AML10100 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">727050 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">736.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">736.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">AML1030 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">716060 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">227.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">227.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">AML1050 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">716060 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">868.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">868.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">AML5100 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">723110 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">1128.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">1128.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">AML530 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">726050 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">2112.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">2112.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">AML550 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">726050 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">908.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">908.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">ARL100 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">710090 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">5996.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">5996.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">ARL100K </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">706090 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">39.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">39.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">ARL20 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">711090 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">6547.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">6547.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row><row><cell><![CDATA[ <div align="left">ARL50 </div>]]></cell><cell><![CDATA[ <div align="left">30.11.2007 </div>]]></cell><cell><![CDATA[   ]]></cell><cell><![CDATA[ <div align="left">703110 </div>]]></cell><cell><![CDATA[ <div align="left">0 </div>]]></cell><cell><![CDATA[ <div align="left">13191.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell><cell><![CDATA[ <div align="left">13191.000 </div> ]]></cell><cell><![CDATA[ <div align="left">0.00000 </div> ]]></cell></row></rows>

Inititialization of Grid:

    <link rel="STYLESHEET" type="text/css" href="codebase/dhtmlxgrid.css">
    <script src="codebase/dhtmlxcommon.js"></script>
    <script src="codebase/dhtmlxgrid.js"></script>
    <script src="codebase/dhtmlxgridcell.js"></script>
    <div id="gridbox" style="height:300"></div>
    <script>
    mygrid = new dhtmlXGridObject('gridbox');
    mygrid.imgURL = "img/";
    mygrid.init();
    mygrid.loadXML("osg8300_dmxgrid.jsp?grid=grid"); //to load initial block of data from server </script>
    </script>
Answer posted by dhxSupport on May 12, 2009 01:13

Such issue occurs because of cell types in your grid is not defined. To define cell type you should use method setColTypes() method or "type" attribute of the <column> tag:

grid.setColTypes("ro,ed,txt,txt,ro,co");

or <column width="100" type="ro"><![CDATA[Materialnummer]]></column>

List of all availibe cell types you can find here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/ExCell_types_usage.html#grid_excellstypes