move filter and dropdown to footer

move filter and dropdown to footer

birger100birger100 Posts: 6Questions: 0Answers: 0
edited October 2011 in General
Hey

I'm new in here so sorry if this i a stupid question.

how do I get the dropdown(number of rows showed) and the filter text box to be placed in the footer(bottom of the table) insted of the top?

Regards
Birger

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited October 2011
    the "sDom" value controls the placing of various elements by indicating their relative position within the sDom string.

    http://www.datatables.net/ref#sDom

    the default sDom string is lfrtip (see above link for explanation of each letter in the string), so if you want to move the length dropdown (l) and the filter (f), just place them after the table (t)

    You may need to edit some of the css associated with those elements in order to get them to place themselves in the way you want.

    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "sDom": 'rtlfip'
    } );
    } );
    [/code]
  • birger100birger100 Posts: 6Questions: 0Answers: 0
    This works perfect:)

    Thanks for the help and quick reply.

    /Birger
This discussion has been closed.