gridview header/footer fix

Fixed the generation header/footer bug with filters.
Old:
```
<thead>
<tr><...header...>
<tr><...filters...>
</tr></tr>
</thead>
```

new:
```
<thead>
<tr><...header...></tr>
<tr><...filters...></tr>
</thead>
```