Categories | Question details Back To List | ||
Incorrect Cell Type: Undefined. I have the xgrid on a page and am trying to use the column type of dhxCalendarA but everytime I try to use this I get the error:- Error type: Incorrect cell type : undefinded Description: undefined I have followed all the examples for inclusion of the correct js files. And my XML is correct (no extra columns etc). If I change the setColTypes to calendar then this works perfectly. But not with dhxCalendarA I would appreciate some pointers on this as I seem to be doing everything correct as per the documentation. I don't understand what I'm doing wrong.. here's my code ( this is part of a larger page so I have just included the points of interest) :- ... <link rel="STYLESHEET" type="text/css" href="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/dhtmlxgrid.css"> <link rel="STYLESHEET" type="text/css" href="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/dhtmlxgrid_skins.css"> <link rel="STYLESHEET" type="text/css" href="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/dhtmlxcalendar.css"> <script>_css_prefix="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/"; _js_prefix="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/"; </script> <script src="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/dhtmlxcommon.js"></script> <script src="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/dhtmlxgrid.js"></script> <script src="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/dhtmlxgridcell.js"></script> <script src="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/dhtmlxcalendar.js"></script> <script src="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/excells/dhtmlxgrid_excell_calendar.js"></script> <script src="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/codebase/excells/dhtmlxgrid_excell_ra_str.js"></script> <script src="http://mac:8888/resman_pro_dev2/administrator/components/com_resman/js/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script> .... <div id="gridbox" width="100%" height="450px"></div> <script type="text/javascript"> mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("http://mac:8888/resman_pro_dev2/administrator/components/com_resman/images/grid/"); mygrid.setHeader("ID,Start Period,End Period,Daily Price,Weekend Price (2 nights),Bed & Breakfast,Half Board,Full Board,All Inclusive"); mygrid.setInitWidths("50,120,120,80,80,60,60,60,60"); mygrid.setColAlign("center,center,center,center,center,center,center,center,center"); mygrid.setColTypes("dyn,dhxCalendarA,dhxCalendarA,edn,edn,ra_str,ra_str,ra_str,ra_str"); mygrid.setDateFormat("d/m/y"); mygrid.setColSorting("int,date,date,int,int,int,int,int,int"); mygrid.setColumnColor("lightgrey"); mygrid.init(); mygrid.loadXML("http://mac:8888/resman_pro_dev2/administrator/components/com_resman/gridget.php?uid=2"); myDataProcessor = new dataProcessor("http://mac:8888/resman_pro_dev2/administrator/components/com_resman/updategrid.php?uid=2"); myDataProcessor.enableDataNames(false); //verify if the value of 2nd column (zero-based numbering is 1) is not empty //myDataProcessor.setVerificator(1); //you can also specify update mode. Availabel modes are: update automaticaly (cell based, row based) and manual update //cell ("cell") based mode means that grid will attempt to update data on server after each editing of cell (on editor closed). //row ("row") based mode means that grid will attempt to update data on server when row selection changed or Enter key pressed //manual ("off") means that you need to run myDataProcessor.sendData() to begin update process (automatic update off). myDataProcessor.setUpdateMode("off");//available values: cell (default), row, off myDataProcessor.setTransactionMode("GET",true); myDataProcessor.init(mygrid); myDataProcessor.defineAction("error",myErrorHandler); function myErrorHandler(obj){ alert("Error occured.\n"+obj.firstChild.nodeValue); myDataProcessor.stopOnError = false; return false; } </script> Answer posted by Support on May 28, 2008 06:25 There are two types of calendar can be used with grid a) dhtmlxCalendar requires dhtmlxcalendar.js dhtmlxgrid_excell_dhxCalendar.js b) YUI calendar requires dhtmlxgrid_excell_calendar.js The calendar sample included in dhtmlxgrid 1.5 and later uses dhxCalendar. Please be sure that you are including related files ( if "calendar" excell type works for you - it seems that you included files for YUI calendar, but not for dhtmlxCalendar ) Answer posted by Rob Locke on May 28, 2008 07:36 Hi, Thanks for the speedy reply and pointer.. it works perfectly now. |