Closed mirjalal closed 10 years ago
@mirjalal please do, as I do not know what is going on. Mind sharing also the error? Thanks
in controller
<?php
public function actionSech ($radio)
{
$maraq = new Maraq;
$sql = Yii::app()->db->createCommand()
->select ('m.maraq')
->from ('maraq m')
->where ('m.idsinif=:ids', [':ids'=>$radio])
->queryAll();
$this->renderPartial('sech', array('sql'=>$sql, 'radio'=>$radio, 'maraq'=>$maraq));
}
?>
in sech.php view file
<?php
// $data1 = CHtml::listData(Maraq::model()->findAll($criteria), 'idmaraq', 'maraq');
$data1 = $sql;
$this->widget('yiiwheels.widgets.multiselect.WhMultiSelect', array(
'model'=>$maraq,
'name' => 'coxlu_checkbox',
'data' => array(
$data1,
)
));
?>
at this scene multiselect group seens like standart listbox. Thanks.
That doesn't look correct. It should be as shown here: http://www.yiiframework.com/doc/api/1.1/CHtml/#listData-detail and array where the keys are the values of the option in dropdown and their values the text. I believe it should be 'data'=>$data1
'data'=>$data is not working. Thanks
What does the queryAll()
returns?
queryAll() returns what I want.
what I want to see:
but what I have:
So in the sech.php the widget seems like 'list box that no style applied'.
As you can see the elements are there... but is missing text... have you checked whether the CSS is registered?
thanks. I solved problem. It's just a little mistake in my codes... :))
@mirjalal would be great if you post your solution here... Just in case other people encounter the same issue.
Hi.
When I use renderPartial(), the widget crashes.. If you want I can share my codes.
Thanks