Connector to Datastore

Is there a php connector to load the datastore directly. Sorry for the Newbie question

Thanks in advance

Dave

If so is there an example to one??

You can use

require_once("./data_connector.php") $data = new DataConnector(..

or

require_once("./data_connector.php") $data = new JSONDataConnector(..

connector has the same usage and api as other connector classes.

Thanks for your quick response.

The connector appears to work I get my data output to the screen if I call the connector directly. My data is not showing in the grid though. The log shows all good. I have included the connector The grid and the includes.

Again Thanks in Advance

Connector***

<?php include("global_vars.php"); ?> <?php require_once("../dhtmlx/dhtmlxConnector_php/codebase/data_connector.php"); require_once("../dhtmlx/dhtmlxConnector_php/codebase/db_mssql.php"); $res = mssql_connect($myServer, $myUser, $myPass); mssql_select_db($myDBName, $res); $data = new JSONDataConnector($res,"MsSQL"); $data->enable_log("c:/temp/ItemDatastore.log"); $data->render_table("Items", "ItemID", "Name,Category,Itemtype,Description,Account,Active,Notes,Qtyonhand,Reorder,BUnit,SUnit,Price,Vendor,Date,CustID,Perishable"); ?>

****** Grid Code**********
function doInitGrid()
{

		var items = new dhtmlXDataStore({url:"php/datastore_connector_items.php"});
		Itemgrid = new dhtmlXGridObject('Itemgrid_container');
    	Itemgrid.setImagePath("dhtmlx/dhtmlxgrid/codebase/imgs/");
   		Itemgrid.setHeader("Name,Category,Itemtype,Description,Account,Active,Notes,Qtyonhand,Reorder,BUnit,SUnit,Price,Vendor,Date,CustID,Perishable");
   		Itemgrid.setInitWidths("*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*");
    	Itemgrid.setColAlign("left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left");
    	Itemgrid.setSkin("light");
		Itemgrid.setColumnId("Name,Category,Itemtype,Description,Account,Active,Notes,Qtyonhand,Reorder,BUnit,SUnit,Price,Vendor,Date,CustID,Perishable");  
		//Itemgrid.load("php/connector_Item.php");
		Itemgrid.init();	
		Itemgrid.sync(items);
		//Itemgrid.groupBy("Category");
    	//var Itemdp = new dataProcessor("php/connector_Item.php");
		var Itemdp = new dataProcessor("php/datastore_connector_items.php");
		//Itemdp.init(Itemgrid);
		Itemdp.init(items);
		Itemdp.setUpdateMode("cell",true)	
		Itemdp.setDataColumns("true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true");

}

***** Includes************

a) please try to update datastore’s init code as

var items = new dhtmlXDataStore({
url:“php/datastore_connector_items.php”,
datatype:“json”
});

b) try to update dhtmlxdatastore.js with the attached one.

c) if above doesn’t help - please pm me the sample of json output from the php file
codebase.zip (37.5 KB)

Stanislav I Pm’ed you on this

Stanislav i pmed you last Friday. I have not heard anything back. Problem still exists. Entire project has stalled i am being told to find another solution. Please help my time with your product is going to be all wasted and i will have to demand a refund. Please help
Dave

Unfortunately we still can’t reconstruct the same issue locally.
Data which you have provided loads correctly in local samples.

But you have a typo in grid configuration, instead of

Itemgrid.setColumnId("Name,Category

you need to use

Itemgrid.setColumnIds("Name,Category