Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by krzak on Nov 27, 2007 14:04
open dhtmlx forum
mygrid.enableSmartRendering is not a function

I have a trouble using enableSmartRendering, here is error message I get:

Error: mygrid.enableSmartRendering is not a function
Source file: http://localhost/page_commission_success.php
Row: 49

here is the code

<script type="text/javascript">
    mygrid = new dhtmlXGridObject('gridbox');
    mygrid.setImagePath("script/codebase/imgs/");
    mygrid.setHeader("ID,Nazwa,Procent");
    mygrid.setInitWidths("50,275,80")
    mygrid.setColAlign("left,left,right")
    mygrid.setColTypes("ro,ed,ed");
    mygrid.setColSorting("int,str,int")
    mygrid.setColumnColor("white,#d5f1ff,#d5f1ff")
    mygrid.init();
    mygrid.setSkin('light');
    mygrid.enableSmartRendering(true,2000,50);
mygrid.loadXML("model/page_commission_success_load_data.php");
</script>
Answer posted on Nov 28, 2007 01:33
All smartrendering related functionality stored in dhtmlxgrid_srnd.js file, which need to be included in project if you want to use SRND mode.
Please refer to documentation it contains info which file need to be used for specific functionality.
Answer posted on Nov 28, 2007 01:39

Answer posted by krzak on Nov 28, 2007 01:40
my sequence is:

<script language="javascript" src="/script/codebase/dhtmlxcommon.js"></script>
<script language="javascript" src="/script/codebase/dhtmlxgrid.js"></script>
<script language="javascript" src="/script/codebase/ext/dhtmlxgrid_srnd.js"></script>
<script language="javascript" src="/script/codebase/dhtmlxgridcell.js"></script>

Answer posted by krzak on Nov 28, 2007 16:02
Ok, and the problem is related to: http://www.dhtmlx.com/docs/products/kb/index.php?s=normal&q=1361
I think that there is missing "}" at the end of dhtmlxgrid_srnd.js file. After I add it by hand it start working.
Answer posted on Nov 29, 2007 01:41
Yes, the problem was caused by configuration software, which incorrectly process js file while preparing packages ( problem was only with str packages, and file already updated on dhtmlx.com )
You fix will solve issue, but you can use file from next thread as well
    http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&q=1332