CGridView and colspan, subheaders

Hi everybody!

I have a little problem with CGridView. How to make a subheaders (colspan\rowspan) in CGridView?


<table class="items">

        <thead>

        <tr>

            <th id="grid_c0" rowspan="2" scope="col">Название датасервера</th>

            <th id="grid_c1" rowspan="2" scope="col">IP датасервера</th>

            <th id="grid_c2" rowspan="2" scope="col">Статус</th>

            <th id="grid_c3" colspan="4" scope="col">Нагрузка</th>

        </tr>

        <tr>

            <th id="grid_c4">CPU, %</th>

            <th id="grid_c6">Канал, %</th>

            <th id="grid_c7">Mem, %</th>

            <th id="grid_c8">HDD, %</th>

        </tr>

        </thead>

        <tbody>

        <tr class="odd">

            <td>srv1 in USA</td>

            <td>0.0.0.0</td>

            <td>online</td>

            <td>10</td>

            <td>30</td>

            <td>50</td>

            <td>12</td>

        </tr>

        <tr class="even">

            <td>srv2 in Europe</td>

            <td>0.0.0.0</td>

            <td>online</td>

            <td>34</td>

            <td>65</td>

            <td>67</td>

            <td>45</td>

        </tr>

        </tbody>

    </table>

Thanks!

Unfortunately, it’s not supported in CGridView as far as I know.

You might want to:

[list=1]

[*] Extend CGridView

[*] Make use of CListView

[*] Give up

[/list]

If I were you, I would take the last one. :P

The others would cost you a lot if you want to keep all the goodies of CGridView like sorting and inline filtering.