Hello,
I would like to run Ajax on a CCheckBoxColumn.
AnyBody know how to do it ?
I try with a classic column, but I didn’t reach the solution.
first approach
array(
'class' => 'CCheckBoxColumn',
'id' => 'ckAm',
'header' => 'pres am',
'headerTemplate' => 'pres PM',
'visible' => '$data->fkPlanning->fk_code_am_pm == Yii::app()->params["codeAm"] || $data->fkPlanning->fk_code_am_pm == Yii::app()->params["codeAmPm"] ? true:falase',
'selectableRows' => 2,
'htmlOptions' =>array('ajax' => array(
'type' => 'POST',
'dataType' => 'json',
'url' => Controller::createUrl('/dfcMesureFormHasPlanning/majPresence'),
'data' => array('codeAmPm' => Yii::app()->params['codePm']))),
), // 'fkPlanningId' => '$data->fk_planning_id','fkMesureForm' => '$data->fk_mesure_form_id',
second approach
array(
'name'=>'ckAm',
'type'=>'raw',
'value'=>'CHtml::checkbox("$data->is_present_am", "$data->is_present_am", array("htmlOptions" =>array("ajax" => array(
"type" => "POST",
"dataType" => "json",
"url" => Controller::createUrl("/dfcMesureFormHasPlanning/majPresence"),
"data" => array("codeAmPm" => Yii::app()->params[\'codePm\']))),
));',
),
thanks
Nath