Populate Coro dynamically server-side with standard version


I’m trying to populate a coro column (value,label) dynamically from another table using DHTMLXGrid Standard Edition 3.5. Is this possible with this version:

[code] $gridConn = new GridConnector($res,“MySQL”);
$config = new GridConfiguration();
$config->setHeader(array(“Power Supply”,“Plug Number”,“PDU Hostname”));
$config->setColTypes(array(“ed”,“ed”, “coro”)); //ed,ed,coro

	//create a new options connector to populate the prefrence level selection box
	$options = new OptionsConnector($res);
	//$gridConn->set_options("ps_distr_unit_id",array("1" => "one", "2"=>"two","3" => "three")); //FAIL
	$gridConn->render_sql("select id, ps_detail, plugnum, ps_distr_unit_id from ps where server_id = 1","id","ps_detail,plugnum,ps_distr_unit_id");
	//$gridConn>render_table("ps","id","ps_detail,plugnum,ps_distr_unit_id"); //FAIL[/code]

The grid is populated as expected, I’m getting and setting values fine but the coro box is not populated with the data from the pdu table. Is this possible with the standard edition?

I see the SQL getting called in the mysql log its just not populating the drop down with that data.

431 Query SELECT `id`,`id` as value,`hostname` as label FROM pdu 431 Query SELECT id, ps_detail,plugnum,ps_distr_unit_id FROM ps WHERE ( server_id = 1) 431 Quit

If this is possible with the standard edition what am I missing?

Thanks in advance!

I’m not sure if this matters but I’m using the dhtmlx folder (in connector-yii.zip) from the yii example:


I’m using new GridConnector($res,“MySQL”); because I couldn’t figure out how to get $grid = new GridConnector(Ps::model()->findAll( $criteria ), “PHPYii”); to not return every row in the database (as opposed to the criteria which only returns foreign key satifying rows).

Baby steps - just getting the drop down properly populated is more important at this point.

Thank in advance for direction / feature clarification.

So I pasted the non working code above from my sandbox controller into the controller of the page where I want the grid and dropdown populated successfully. Odd but hey looks like I answered my question.

There is no limitation on standard version, it supports all server side integration features.

As for options loading - it will work with MySQL adapter but will not with PHPYii, as it based on sql auto-generation and not on model objects. We have plans to update the code and provide better support for PHPYii in near future