YII2 add colspan in gridview header -
how add colspan
in header in gridview??
normally header looks this...
<table class="table"> <thead> <tr> <th>header1</th> <th>header2</th> <th>header3</th> <th>header4</th> <th>headera1</th> <th>headera2</th> <th>headera3</th> <th>headerb1</th> <th>headerb2</th> <th>headerb3</th> </tr> </thead> <tbody> <tr> <td>body1</td> <td>body2</td> <td>body3</td> <td>body4</td> <td>body5</td> <td>body6</td> <td>body7</td> <td>body8</td> <td>body9</td> <td>body10</td> </tr> </tbody> </table>
i want make this...
<table class="table"> <thead> <tr> <th rowspan=2>header1</th> <th rowspan=2>header2</th> <th rowspan=2>header3</th> <th rowspan=2>header4</th> <th colspan=3>header a</th> <th colspan=3>header b</th> </tr> <tr> <th>a1</th> <th>a2</th> <th>a3</th> <th>b1</th> <th>b2</th> <th>b3</th> </tr> </thead> <tbody> <tr> <td>body1</td> <td>body2</td> <td>body3</td> <td>body4</td> <td>body5</td> <td>body6</td> <td>body7</td> <td>body8</td> <td>body9</td> <td>body10</td> </tr> </tbody> </table>
this not possible without extending , rewriting grid view widget. take @ kartik gridview. if take @ demo can see has functionality need.
Comments
Post a Comment