Cgridview (Datas) - Group By Months

Hello,

I have a problem with CGridView.

In database everyday is adding new row- date ( today "2013-01-10", tomorrow "2013-01-11", …) and

CGridView show all datas in one list (divide to pages on 10 row). I want group this list by month- one month = one page.

For example:

First page:

2013-01-09

2013-01-31

(22 rows)

Second page:

2013-02-01

2013-02-28

(28 rows)

Any ideas?

Thanks!

I don’t think there’s an easy way to do that within the grid view. The best way might be to disable pagination entirely on the grid view and let the user choose the month another way (links or a drop down). If you keep the month selection in the URL, the user will be able to bookmark the page.

Then, fetch just the selected month’s data from the database and feed it into the grid view.