Can someone explain me why ? I think is important because we cant pass a row id to a javascript application.
Can someone explain me why ? I think is important because we cant pass a row id to a javascript application.
Please can someone help me ?
I overwrite CButtonColumn in this way to provide $data in option array:
$option=isset($button['options']) ? $button['options'] : array();
foreach ($option as $key=>$value){
if(preg_match('/{(.*)}/', $value, $matches)){
$ar=explode("->",$matches[1]);
$newvalue=$$ar[0];
$val=$newvalue->$ar[1];
$options[$key]=$val;
else{$options[$key]=$value;}
}
}
in the option I have to use:
‘class’=>‘ButtonColumn’,‘updateButtonUrl’=>‘Yii::app()->createUrl("#")’,‘updateButtonOptions’=>array(‘onclick’=>‘return false;’,‘class’=>‘update’,‘id’=>’{data->id}’),
Can someone help to If this solution is a good way or not?.
thanks all.
Hello,
Did you find a solution? I have the same problem.