Hi, i’ve tried to populate a grid from sqlserver, following this tutorial:
docs.dhtmlx.com/tutorials__dhtm … index.html
The connection is ok but render_table doesnt work .
Here my files:
DATA.PHP
<?php
// phpinfo();
require_once("codebase/connector/grid_connector.php");//includes related connector file
$serverName = "SRVDPH05\SQL2014";
$connectionInfo = array( "Database"=>"*******", "UID"=>"*****", "PWD"=>"******");
$res = sqlsrv_connect( $serverName, $connectionInfo);
$conn = new GridConnector($res,"SQLSrv"); //initializes the connector object
$conn->enable_log("temp.log", true);
$conn->dynamic_loading(100);
$conn->render_table("BANABI","CODICE","CODICE,ANAGRA"); //loads data from db
?>
INDEX.HTML
dhtmlxGrid. Server side
<script src="codebase/dhtmlxgrid.js"></script>
<script src="codebase/dhtmlxgridcell.js"></script>
Result in attachments.
Ok the problem was that :
In data.php we need to include:
require_once(“codebase/connector/db_sqlsrv.php”);