Place filters outside table
Closed this issue · 2 comments
GoogleCodeExporter commented
Filtering itselfs works like a charm. Except I need the select boxes outside my
table in a div above the main table, not in the thead or tfoot.
Any idea how I can do this ?
tnx
Rob
Original issue reported on code.google.com by rob...@gmail.com
on 11 Jul 2011 at 12:15
GoogleCodeExporter commented
you can extract the element tr from the table and insert it into a table you
can place where you like.
try something like this:
<div id="divOutside">
<table id="tableInYourDiv">
<tbody id="filtersInYourDiv">
</tbody>
</table>
</div>
<table id="yourTable">
<thead >
<tr id="header">
<th>col 1</th>
<th>col 2</th>
<th>col 3</th>
</tr>
<tr id="filters">
<th>col 1</th>
<th>col 2</th>
<th>col 3</th>
</tr>
</thead>
<tbody...etc etc>
</table>
put this code after the table and filters have drawn (as last thing on your
script, after $('#yourTable').dataTable().columnFilter(); )
$("#filtersInYourDiv").append($('#filters'));
//you can use $("head tr:last") if your filter tr doesn't have an id
Original comment by setm...@gmail.com
on 11 Jul 2011 at 12:44
GoogleCodeExporter commented
Thanks for this comment.
I'm closing this issue.
Regards,
Jovan
Original comment by joc...@gmail.com
on 25 Sep 2011 at 12:40
- Changed state: Done
- Added labels: Type-Other
- Removed labels: Type-Defect