in controller:
$teclados = Teclado::model()->findAll();
$tecladosA = array();
foreach ($teclados as $value) {
$tecladosA[]=$value->brand."-".$value->model;
}
$this->render('view',array(
'model'=>$this->loadModel($id),
'teclados'=>$tecladosA,
));
My view:
echo CHtml::checkBoxList('Teclados','Teclados',$teclados,
array(
'class'=>'RitmoTeclado_TecladoName',
));
Now how can i set the idteclado from model to checkBoxList value