Hi!
I’m trying to populate a grid with data from a mysql database. The problem is that in the html page i get this message:
Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2) Timestamp: Thu, 12 Nov 2009 00:13:59 UTC Message: ‘this.obj.firstChild’ is null or not an object Line: 729 Char: 45 Code: 0 URI: localhost:81/test/codebase/dhtmlxgrid.js
Could anyone help me?
P.S.: I’ve tried the samples included in dhtmlxConnector_php.zip, but when the page loads I get a popup with the “Message from webpage” title and the message is actually the content of the 01_basic_connector.php file:
<?php
require_once("…/config.php");
$res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
require("…/…/codebase/grid_connector.php");
$grid = new GridConnector($res);
$grid->enable_log(“temp.log”,true);
$grid->dynamic_loading(100);
$grid->render_table(“grid50000”,“item_id”,“item_nm,item_cd”);
?>
Please help me if u have any ideea. Thanks!
Problem is not related to connectors or DB data it is an incorrect initialization of the grid.
You need to define the structure of column headers ( setHeader, setInitWidths and grid.init commands at least ) on client side before loading data in the grid. ( the server side code provides only data , not the configuration )
thank you, i found the problem and it works now!