datatable - information placing

datatable - information placing

rajadevrajadev Posts: 3Questions: 0Answers: 0
edited July 2011 in DataTables 1.8
Hi.

I want to place the information about the table like showing "Showing 1 to 10 of 60 entries" and "length" and "pagination control" are in same line. Please help me for this.

Raja M

Replies

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    http://datatables.net/ref#sDom
    http://datatables.net/release-datatables/examples/basic_init/dom.html

    Allan
  • rajadevrajadev Posts: 3Questions: 0Answers: 0
    Thanks Allan..

    Actually the information "Showing 1 to 10 of 60 entries" is displayed in a separate line and in the second line other things like "length" and "pagination control" are displayed. How to make all these in a single line.

    Raja M
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited July 2011
    in your sDom variable describing the DOM layout of your items, each element is assumed to be in it's own , thus on their own line by default. If you place them in < and > tags with "inline" class set they will be placed on the same line

    [code]
    $('#myTable').dataTable( {
    "sDom": 'TRr<"inline"l> <"inline"f><<"inline"p><"inline"i>>t<"inline"p><"inline"i>'
    })
    [/code]

    where "div.inline" is defined in datatables.css as
    [code]
    div.inline {
    display:inline-block;
    }
    [/code]

    results in html code like this
    [code]


    Processing...


    Show

    10
    25
    50
    100
    entries




    . Filter by:

    FirstPrevious12345NextLastShowing 1 to 10 of 24,494 entries

    etc.
    [/code]
This discussion has been closed.