Undefined variable: data

<?php $this->widget(‘bootstrap.widgets.BootGridView’, array(

'type'=&gt;'striped bordered condensed',


'dataProvider'=&gt;&#036;dataProvider,


'template'=&gt;&quot;{items}&quot;,


'columns'=&gt;array(


 array(


'label' =&gt; 'Product_ID',


'type' =&gt; 'raw',


'value' =&gt; &quot;CHtml::Link(&#036;data-&gt;Name, 'abc')&quot;


),


array('name'=&gt;'Name', 'header'=&gt;'Name')


    )


));

?>

why would it not work but when i use ‘value’ => ‘$data->Name’ it works.

Use ’ instead of "

‘value’=>‘CHtml::link($data->Name,\‘abc\’)’

This variant should work fine:





		array(

                    'name'=>'Product_ID',

                    'type'=>'raw',

                    'value'=>'CHtml::link($data->Name,"abc")',

                ),



You may also use CLinkColumn class to render urls in your cells.




array(

'class'=>'CLinkColumn',

'header' => 'Product_ID',

'labelExpression' => '$data->Name',

'url' => 'abc' 

),