views:

33

answers:

1

All,

I am using Jquery Data Tables. I am using the following example:

DataTables with Pagination

I was wondering if there's a way to display "Show 10 Entries" on the bottom instead of top. It should be displayed right before "Showing 1 to 10 of 51 entries".. at the bottom of the table.

How can I do that?

Thanks

+2  A: 

Had a similar problem (wanted to remove some unnecessary controls) and the only way to deal with it seems to be modifying table yourself. I used fnDrawCallback callback (http://datatables.net/usage/callbacks).

It will be something like this in your case

$('#tableId').dataTable({
    "fnDrawCallback": function () {
        $('#tableId_info').prepend($('#tableId_length'));
    }
});

Just check the generated code in that demo, it's really quite simple (except it has no formatting or indentation).

You can also use class names instead of ids, if you're not afraid to affect other tables on the page. They're in the form dataTables_length.

Use css for additional styling.

Nikita Rybak