CGridView and child rows ordering

Hello,

I have one problem regarding how to print rows in CGridView in exact order, when I have order column AND parent_id.

parent_id is actually record from same table.

So I have:

id, title, parent_id, order

And I want to print rows this way:

Category 1

- child of cat 1


- child 2 of cat 1

Category 2

Category 3

- child of cat 3

There are only 2 levels - parent -> child.

Does anybody can help me with this?

Thanks.

If I understand what you explain, the groupgridview extension should help.

See for instance the demo page with extra rows to get it.