Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Roger Way on Jan 15, 2010 06:35
open dhtmlx forum
Grid - mygrid.setDateFormat raises Error: Object doesn't support this property or method

In the following code the

mygrid.setDateFormat("%e %b %y");

raises the following error: "Error: Object doesn't support this property or method"

Have I missed a required .js file?

Regards

Roger Way

= = =
<head>
<script src="dhtmlxGrid/codebase/dhtmlxcommon.js" type="text/javascript"></script>
<script src="dhtmlxGrid/codebase/dhtmlxgrid.js" type="text/javascript"></script>
<script src="dhtmlxGrid/codebase/dhtmlxgridcell.js" type="text/javascript"></script>
<script src='dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_grid.js'></script>
<script src='dhtmlxGrid/codebase/ext/dhtmlxgrid_srnd.js'></script>
<link rel="STYLESHEET" type="text/css" href="dhtmlxGrid/codebase/dhtmlxgrid.css">
</head>

<body>
<div id="gridbox" style="height:300px;width:600px;"></div>
<script>
mygrid = new dhtmlXGridObject("gridbox");
mygrid.setImagePath("dhtmlxGrid/codebase/imgs/");
mygrid.setEditable(true);
mygrid.setSkin("light");
mygrid.setDateFormat("%e %b %y");
mygrid.setHeader("UID,Student,Grade,Effort,Comment");
mygrid.setInitWidthsP("*,*,*,*,*");
mygrid.setColTypes("ed,ed,ed,ed,ed");
mygrid.setColAlign("right,left,center,center,left");
mygrid.setColSorting("str,str,str,str,na");
mygrid.enableResizing("true,true,true,true,true");
mygrid.enableSmartRendering(false)
mygrid.enableLightMouseNavigation(true);
mygrid.enableMultiselect(false);
mygrid.init();
Answer posted by Alex (support) on Jan 15, 2010 06:49

The setDateFormat method is included only in PRO edition and can be applied only to dhxCalendar and dhxCalendarA types:

http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/01_cell_types/07_pro_excells_numberformat.html