In my project, i am using cgridview to display some information and using the pagination built with the cgrid view. but now i am facing a usability problem with pagination. that s, consider i have 3 pages and the pagination looks like << < 1 2 3 > >>. when i clicked the 3rd page the pagination should look like << < 1 2 3 and in case of 1st page the pagination should look like 1 2 3 > >>. how can i do this. please provide me a solution.
我的get子一样。
$widget = $this->widget( zii.widgets.grid.CGridView , array(
id => request-grid ,
dataProvider => $model->search(),
cssFile => Yii::app()->baseUrl . /media/css/gridview.css ,
summaryText => ,
enablePagination => true,
template => {items} ,
pager => array(
class => LinkPager ,
cssFile => false,
header => false,
firstPageLabel => First ,
prevPageLabel => Previous ,
nextPageLabel => Next ,
lastPageLabel => Last ,
),
columns => array(......));
还将扩大CLinkPager这一构成部分的班级。
class LinkPager extends CLinkPager
{
public $maxButtonCount=3;
}