How to display line numbers in CGridView

How can I display "line numbers" in a column of CGridView.

Note: These line numbers are not ID from database. These should be separate from it.

Can some one guide me in this regards.

Thanks in advance

You can use $row for the value but it starts from 0 on every page


Thanks for reply.

How to display other than that. Like in normal does (not starting from 0 on each page).

Create a column like this







This could be anything you need.


Very nice, thanks :)