Get the absolute row number in a grid

后端 未结 2 1669
借酒劲吻你
借酒劲吻你 2021-01-12 04:30

In yii\'s CGridView I can get the current row number by using $row. But this returns the row index within the current page only. What I rea

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-12 05:07

    Maybe this will help: CDataProvider has a property "totalItemCount" which can be used:

    Ex: $this->grid->dataProvider->getTotalItemCount();

    More details at: http://www.yiiframework.com/doc/api/1.1/CDataProvider#totalItemCount-detail

提交回复
热议问题