clistview pager----set last pager as default page

Hi,

has anybody tried to set last page as the default page, normally the newest comment will be appended to last page, so I want the last page is set as default. can anybody give me some pointer. thanks a lot.

nobody has encountered this problem?

There is already a topic with the solution in the forum

http://www.yiiframew…p?/topic/12290-

But IMO a better idea would be to get the commends in descending order so that the latest comments are first and on the first page…

This is solution:




$p=$dataProvider->pagination;

$p->setItemCount($dataProvider->getTotalItemCount());

$p->currentPage=$p->pageCount-1;



where $dataProvider is CDataProvider of your data’s

great reference both of you. thanks a lot.

in this case, users have to read the comments from buttom up, and then go backs to the bottom to comment. ,unless we move the comment form to the top…