Custom column filters on the top

Custom column filters on the top

frenzyfrenzy Posts: 21Questions: 0Answers: 0
edited June 2011 in General
Hi,

I am using datatables with custom individual column sorting (http://www.datatables.net/examples/api/multi_filter.html) and it works great, but i was just wondering is there a simple solution to put the column filter fields on the top, right below the column headers row, instead of putting it in the footer of the table (it is more accessible this way, if, for instance, pagination length is 50 or more). I know I can put them above the table, but this should be more convenient if possible.

Thanks in advance!

Replies

  • versakversak Posts: 26Questions: 0Answers: 0
    Put the filter row stuff into the THEAD as TDs (not THs) and change the [code]$("tfoot input")[/code] stuff to [code]$("thead input")[/code]
  • frenzyfrenzy Posts: 21Questions: 0Answers: 0
    Doh! I feel so dumb for not figuring this out by myself. But, thanks a lot mate!
  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    There is a plug-in for DataTables which can help with this kind of thing as well: http://jquery-datatables-column-filter.googlecode.com/svn/trunk/index.html

    Allan
This discussion has been closed.