Two separate tables in CGridView

Hi all,

Is it possible to display information from two separate tables (which are not in relation) in CGridVeiw?

Case:

Table1: template

Table2: custom_template

Both tables have the same columns, except custom_template have one more.

Since the data they representing is almost the same, I want to display it at one place in one view.

Thanks in advance.

merge all results from one table and another, you can do that with merge function and passing to CArrayDataProvider like is shown in example.

I found another solution too. I tried with CSqlDataProvider with UNION query and it works perfectly.

Thanks.