Server-Side Integration

For implementing server-side functionality you should use dhtmlxConnector and dataProcessor like for any other DHTMLX component.

dhtmlxConnector lets you just load data from DB.

dhtmlxConnector + dataProcessor allows making Create/Update/Delete operations.

JSONDataConnector/DataConnector

There are 2 connector types you can use for dhtmlXDataStore objects:

  • JSONDataConnector
  • DataConnector

They both work in the same way but differ in the type of the returned data. The first one generates 'xml' data feed, the second one - 'json' data feed.

<?php 
require_once("../../connector/data_connector.php");
require_once("../../connector/db_sqlite.php");
 
if (!$db = sqlite_open('db', 0777, $sqliteerror)) {
    die($sqliteerror);
}
$data = new JSONDataConnector($db,"SQLite");
$data->render_table("users", "id", "name,age,city");
?>

dataProcessor

To implement CRUD operations you should initialize dataProcessor and define a dataStore object as the parameter of the init() command.

var myDataStore = new dhtmlXDataStore({
    url:"php/data.php",
    datatype:"json"
});
 
myDP = new dataProcessor("php/data.php");
myDP.init(myDataStore);

Detailed information

You can find the detailed information concerning the usage of dhtmlxConnector and dataProcessor in the related documentation:

Back to top