Hi,
I just wanted to ask if there is any easy way to teach CGridView to show Database-Columns as rows and entries as columns?
Example:
I have a database table which looks like this:
UserID | Username | Password | HasExtAccess | IsEnabled
0 | Peter | 12345 | 1 | 1
1 | Lois | 67890 | 0 | 1
2 | Stewie | abcde | 0 | 0
The grid now show the table like it looks in the database.
I want it to show it like this:
| 0 | 1 | 2 |
Username | Peter | Lios | Stewie |
Password | 12345 | 67890 | abcde |
HasExtAccess | 1 | 0 | 0 |
IsEnabled | 1 | 1 | 0 |
The only way I found is to re-sort everything to an array and use this instead of the default $dataProvider.
It’s pretty noobish but I just recently started using Yii.
Is a nicer way to achieve this?
Thanks in advance.