Clistview And Scrollbar

hi, I’m using a CListView to display data from the database via a DataProvider.

Potentially there will be a fair amount of data but a limited amount of space. Instead of Pagination, is it possible to have a vertical scroll bar which preferably doesn’t affect the table header.

I know a work around way to do this in php/html, but never had to use Yii Frameworks before.


$this->widget('zii.widgets.CListView', array(




	'template' => "{sorter}\n{items}\n{pager}",



Hi Dice42, welcome to the forum.

CListView has a format something like the following:

<div id="list-id" class="list-view">

    <div class="summary"></div>

    <div class="sorter"></div>

    <div class="items">

        item #1

        item #2

        item #3


        item #n



It may differ according to your configuration of the list.

What you have to do will be just applying a proper style to "#list-id div.items", specifying "height" and set "overflow" to "auto", or something like that.