Hi,
I use a regular CActiveDataProvider to fill my view.
I know that you can get the "totalItemCount" via totalItemCount
Is there a way to get the "current Item Number" when processing it in the view?
Lets say I have 20 results and I want Result 5 and 7 look different.
Is there a way to do it?
THX
Andreas
Well, at least within CGridView you can rely on $row containing the current item number. Should work in CListView as well.
mikl
(Mike)
3
shgpan
(Philippe Pan)
4
is there a solution for this problem?
i am facing exactly the same problem and i think it’s a problem that every web developer would encounter sooner or later !
mdomba
(Maurizio Domba Cerin)
5
shgpan what problem are you referring to
The one asked in this thread has been responded by DA:sourcer and Mike.
haryanto
(Dadan2383)
6
to show number in CListView, u can try :
[font="Courier New"]<?php echo $widget->dataProvider->pagination->currentPage*$widget->dataProvider->pagination->pageSize + $index+1;?>[/font]