I am using gridview to display a set of data. Everything works fine except I don't have any clue on how to implement a read more link within the gridview. Below is the code for the view, I am using Yiibooster TbGridView, but code should be almost identical for CGridview too.
<?php $this->widget('bootstrap.widgets.TbGridView', array(
'dataProvider'=>$dataProvider,
'columns'=>array(
'startdate'
'status',
'description',
array(
'htmlOptions' => array('nowrap'=>'nowrap'),
'class'=>'bootstrap.widgets.TbButtonColumn',
'template' => '{view},{update}',
'viewButtonUrl'=>'Yii::app()->createUrl("status/view",$params=array("id"=>$data["id"]))',
'updateButtonUrl'=>'Yii::app()->createUrl("status/update",$params=array("id"=>$data["id"]))',
)
)))
?>
Here, I don't want to display the complete description, but a substring of it and along with that a button called 'read more' which the user can click to display the whole 'description'. Any ideas on how to implement it?