I’m Trying to insert a progressbar into a column in a GridView. I can insert the progressbar to show in the column but I cannot reference special Var $data
My column is precent_comp which is an integer value and I would like to drive the progressbar based on the value contained with in.
View:
<script type="text/javascript">
$(document).ready(function(){
setInterval(function(){
$.fn.yiiGridView.update('JobsView');
}, 5000);
});
</script>
<?php
$this->breadcrumbs=array(
'Jobs',
);
?>
<!-- Grid View -->
<?php
//print_r($model->joinSearch()->getData());
$this->widget(‘zii.widgets.grid.CGridView’, array(
'id'=>'JobsView',
'dataProvider'=>$model->Search(),
'filter'=> $model,
'selectableRows'=>50,
'columns'=>array(
'job',
array (
'name'=>'percent_comp',
'value'=>'Controller::createWidget("zii.widgets.jui.CJuiProgressBar",array(
"value"=>"$data->percent_comp",
))->run()',
),
),
));
?>