Yii Gridview - Add Vertical Scroll For A Table Data In Cgridview

I have to add a vertical scroll to a particular column of a CGridview in Yii.

I tried the below code, but was unsuccessful.




    array(

                        'name' => 'Address',

                        'value' => function($data) {         //*the closure that works*

                            return '<div style="overflow-y:scroll;height="100px">'.$data->Address.'</div>';

                        },),  



As the data in a cell is very big, How can I add a scroll inside that cell.

Hi,

Do you think is it possible to add scrollbar in TD? Please first try this… if u can achieve that… then try this

Hi,

what is your result ? Did you add ‘type’=>‘raw’ ?

The approach is correct. The problem is in the formatting of the <div> statement. See http://stackoverflow.com/questions/3537734/html-enable-scrolling-within-a-tables-cell.