Tune "PHPYii" or "MySQL" data driver in GridConnector

In my Yii controller - actionGrid_data() looks like this:
public function actionGrid_data()
//MySQL data driver
//PHPYii data driver

	//$grid = new GridConnector($res, "MySQL");
		$grid = new GridConnector(Lines::model(), "PHPYii");
		//$options = new OptionsConnector($res);
		$grid->set_options("status", array("0"=>"status 1", "1"=>"status 2"));
		$grid->configure("-", "id", "people_id, text, status");

It works good but… I want get rows from database only with “status=1” to have a dhtmlxGrid filled with lines with status=1.
So I try to write Yii code in grid connector - Lines::model()->findAll(array(“condition”=>“status = 1”,“order”=>“id”); but as I understood it will not work.
Please answer when you implement such possibilities in grid connector, or tell if i will use “MySQL” instead of “PHPYii” data driver, will it obligatory to write ‘config’ in controller?

$config = new GridConfiguration(); $config->setHeader("Username,First Name,Last Name,Email"); $config->setInitWidths('150,150,150,*'); $config->setColTypes("ro,ro,ro,ro"); $grid->set_config($config);

Now I have all settings in view.

Please update connector files from the github
github.com/DHTMLX/connector-php … master.zip

latest version will allow to use above syntax.

As for config - you can configure grid in the js code of related view.

Stanislav, it’s looks better now, but it doesn’t save any changes in grid now. When any text edited it becomes bold and appears a popup browser window to “confirm action on my_project_name”. Something wrong with saving mechanizm…

With previous code all data save just after edit it.

mistake appears just when add Lines::model()->findAll()

but it doesn’t save any changes in grid now
Check the above gist link - it shows how data saving can be enabled.
If you are providing filtered set of data to connector - it can’t be used for data updating, only for data loading. But it possible to create separate action for data saving, where connector will receive model object instead of dataset.

Great! It helped me, thank you!