How to Manipulate the Search Field

How to Manipulate the Search Field

squadwuschelsquadwuschel Posts: 4Questions: 0Answers: 0
edited September 2011 in General
Hello,

My first Problem is how to hide the "Search" Text bevore the Searchbox and how can I position the Searchbox in my TableHeader




I Want that serachbox Here Without the "Search" name bevore




....

I don't know if I get the Searchbox ther with the sDom Settings, because I don't really Understand them. :-/

perhaps someone can help me or post me a link where I can find a demo or so.

thx much squadwuschel

Replies

  • allanallan Posts: 63,531Questions: 1Answers: 10,474 Site admin
    The sSearch language option can be used to alter (or remove) the search string: http://datatables.net/ref#oLanguage.sSearch .

    If you want the search box actually in the header, then you don't want to use the default filter, you'd need to insert your own text input box and then bind a call to fnFilter ( http://datatables.net/api#fnFilter ) to any keypress in the text box.

    Allan
  • squadwuschelsquadwuschel Posts: 4Questions: 0Answers: 0
    thx much i will try it out :-)
  • squadwuschelsquadwuschel Posts: 4Questions: 0Answers: 0
    with the extra Searchbox works fine, but I want to Remove the automatic created Searchbox and when I use the "bFilter": false, the textbox is gone but I can't also filter any more with my new Textbox :-/
    How can i hide the textboxsearch without disabling the search?
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited September 2011
    the default sDom is 'lfrtip'

    f is for "filter" (search); if you take it out, it doesn't draw the default "search" textbox. but leave bFilter set to true (default) so that filtering works via fnFilter

    use 'lrtip'

    http://www.datatables.net/ref#sDom
    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "sDom": 'lrtip'
    } );
    } );
    [/code]
  • squadwuschelsquadwuschel Posts: 4Questions: 0Answers: 0
    thx much works fine
This discussion has been closed.