Hi
I’m trying this new version of dhtmlx (last one I used was 3 years ago !!) and it now implements a feature I had to code manually back then : PHP connection, great
I tried and it works fine, update data, insert and all, so I’m really happy.
But I tried the thing I found in the sample where you link a cell to a combolist coming from another sql table and I’m stuck: the combo is empty except for the data already in the cell
I tried the “simple” version where you specify manually the list of data you want in the combobox… to no avail the combo is stil empty with only one value.
here is the code for the connector, I can’t debug it so I don’t know where I’m wrong, can anyone help me?
[code] require_once “…/db.inc”;
require("…/dhtmlx/connector/base_connector.php");
require("…/dhtmlx/connector/grid_connector.php");
require("…/dhtmlx/connector/options_connector.php");
$res=mysql_connect($dbserver,$user,$password);
mysql_select_db($database);
$grid = new GridConnector($res);
$grid->enable_log("grid.log",true);
//$grid->dynamic_loading(100);
$config = new GridConfiguration();
$config->setHeader(array("id","Player","Class","Role 1","Role 2"));
$config->setColTypes(array("ed","ed","co","co","co"));
$grid->set_config($config);
$filter1 = new OptionsConnector($res);
//$filter1->enable_log("filter.log",true);
$filter1->render_table("st_class","id","id(value),ClassFR(label)");
$grid->set_options("ClassID", $filter1);
//$grid->set_options("ClassID",array("1","2","3","4"));
$grid->set_options("Role1ID", array("1","2","3","4"));
$grid->set_options("Role2ID", array("1","2","3","4"));
$grid->sql->set_transaction_mode("record");
$grid->render_table("st_player", "id");[/code]
sql fields for table st_player
id
player
ClassID
Role1ID
Role2ID
sql fields for table st_class
id
ClassFR
ClassEN
Description
(as you can see I tried to add the “enable_log” for the $filter1 var, it just ignore the first log and
start writing in the new one, dunno if it’s a bug or not)