Need to reopen old thread.
That generally doesn’t answer the question, in my opinion. So what, that I can count all data rows passed to CGridView data provider? With what parameter I should compare this number? Citing documentation:
gives us that there is now way to get to data provider in expression evaluated per each row.
So the question remains open. How to display particular button for all rows except last one? What expression should be used for visible parameter?
And speaking about total number of rows. Does CGridView.summaryText takes CActiveDataProvider->criteria->condition into consideration? For me it seems that non. I have 15 records in one of my tables, and one of them has del column > 0. When I passed CActiveDataProvider with criteria set to CDbCriteria>condition = ‘del = 0’; I got summary text saying: “Positions 1-14. Total count: 15.” (or something similar, as I’m translating Polish message into English".
Of course I have only fourteen records in CGridView and no pager, as in fact there are only fourteen, not fifteen total records.
Attribute CGridView.summaryText was not modified by my in anyway. It displays default text. And pagination component of CActiveDataProvider is set to ‘pagination’=>array(‘pageSize’=>20), so there is now way that last records is on some other page. It simply looks like summaryText gives incorrect record count.