Categories | Question details Back To List | ||
dxhtml connector: XML/DB info not populating grid I've just downloaded the video samples via dhtmlx.com/docs/download/dhtmlxconnector_php_video_samples.zip and just trying out the samples here. When loading the associated connector.php I get an XML tree fully populated, however upon loading sample.html I have a blank grid. Running WAMP 2.0. I haven't customized a thing, simply tried connecting it to the SQL table which comes with dhtmlx Scheduler. Here is the source: connector.php: <?php require_once("../dhtmlxConnector_php/codebase/grid_connector.php"); $res=mysql_connect("localhost","root","randompass"); mysql_select_db("testDB"); $grid = new GridConnector($res); $grid->dynamic_loading(100); $grid->render_table("events","event_id","event_name,details"); ?> sample.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link href='../dhtmlxGrid/codebase/dhtmlxgrid.css' rel='STYLESHEET' type='text/css'> <link href='../dhtmlxGrid/codebase/ext/dhtmlxgrid_pgn_bricks.css' rel='STYLESHEET' type='text/css'> <script src='../dhtmlxGrid/codebase/dhtmlxcommon.js'></script> <script src='../dhtmlxGrid/codebase/dhtmlxgrid.js'></script> <script src='../dhtmlxGrid/codebase/dhtmlxgridcell.js'></script> <script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_pgn.js'></script> <script src='../dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js'></script> <script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script> <script src='../dhtmlxConnector_PHP/codebase/connector.js'></script> </head> <body> <div id="gridbox" style="width:632px; height:370px;"></div> <div id="pagingArea"></div> <script> mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath('dhtmlxGrid/codebase/imgs/'); mygrid.setHeader("Column A, Column B"); mygrid.setInitWidths("100,*") mygrid.setColTypes("ed,ed"); mygrid.setSkin("modern") mygrid.attachHeader("#connector_text_filter,#connector_text_filter") mygrid.setColSorting("connector,connector") mygrid.init(); mygrid.enablePaging(true,50,10,"pagingArea",true); mygrid.setPagingSkin("bricks"); mygrid.loadXML("connector.php"); var dp = new dataProcessor("connector.php"); dp.init(mygrid); </script> </body> </html> Any ideas? Thank you in advance. Answer posted by Support on Aug 03, 2009 02:15 The code which you are using looks correct and must not cause any serious problems. Please check the next a) mygrid.enablePaging(true,50,10,"pagingArea",true); mygrid.setPagingSkin("bricks"); paging mode available only in pro version of dhtmlxgrid, standard edition doesn't support such commands. b) you can try to add the next command to server side connector $grid->dynamic_loading(100); $grid->enable_log("some.txt",true); $grid->render_table("events","event_id","event_name,details"); With such code, you will be able to see error log , if some problem occurs during data fetching. |