Data not showing in a grid

Based on the example, I’ve made grid connected to a MySQL database via the connector.
My problem is that my grid is just empty, but i have no errors at run time.


<script src="../scripts/dhtmlx/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script src="../scripts/dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="../scripts/dhtmlx/dhtmlxConnector/codebase/connector.js"></script>
<script src="../scripts/dhtmlx/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script>

<script type="text/javascript">
	var mygrid, myDP;

	function doOnLoad() {
		mygrid = new dhtmlXGridObject("gridbox");

		myDP = new dataProcessor("grid.php");

grid.php :

<?php require_once('../scripts/dhtmlx/dhtmlxConnector/codebase/grid_connector.php'); $res = mysql_connect("localhost","root",""); mysql_select_db("singman"); mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'"); $conn = new GridConnector($res, "MySQL"); $conn->enable_log("temp.log"); $conn->render_table("maps","id","id, name"); ?>

Result of grid.php :

<?xml version='1.0' encoding='utf-8' ?>


Log started, 15/01/2013 12:01:32

SELECT id,id,name FROM maps ORDER BY name DESC

Done in 0.005748987197876s

Unfortunately the issue cannot be reconstructed locally.
Please, provide a demo link where the issue can be reconstructed.

Instead, can you provide a REAL WORKING EXAMPLE with sources, including database ?
I think the Grid widget is have big problems with UTF-8 characters encoding.

Here you can find an example of grid with dataprocessor. Data is loaded if UTF-8: … _init.html

If your issue still occurs - please, provide a demo-link where the issue can be reconstructed.

If I compare the given example and my source, there is a difference in the data returned in XML :
dhtmlx example :

<?xml version=[b]"[/b]1.0[b]"[/b] encoding=[b]"[/b]utf-8[b]"[/b]?>

<rows id=“0”>

My data :

<?xml version=[b]'[/b]1.0[b]'[/b] encoding=[b]'[/b]utf-8[b]'[/b] ?> ...

Can you tell me why that happen ? I’m using the same connector, but maybe you have something in your php script ?

Just in case, the 2 differences are :

  • using double quotes in your data
  • returning with a parameter in your data

Ok, found the error :

  • Missing dhtmlxgridcell.js file in header inclusion.

You can close this post.