Can i use sDom twice

Can i use sDom twice

naijacodernaijacoder Posts: 6Questions: 0Answers: 0
edited March 2011 in TableTools
I'm trying to use the tabletools on my top page and at the same time i want to have the table,filtering and pagination at the top too.
I don't mind leaving the tabletools at the top with the filtering and then the others at the bottom.
But i have trouble with the configuration.
Hope you can help me.
Thanks
**See below what i'm trying to achieve

[code]
$(document).ready(function () {
/* Initialise the DataTable */
var oTable = $('#EmployeeList').dataTable({
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/TableTools/swf/copy_cvs_xls_pdf.swf"},
"oLanguage": { "sSearch": "Search all Columns:" },
"iDisplayLength": 10,
"aaSorting": [[0, "asc"]],
"sPaginationType": "full_numbers", "iDisplayLength": 30,
"sDom": '<"topiflp"<"clear">>rt<"bottom"iflp<"clear">>'


});
[/code]

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    You just need to change the order of the options in your sDom parameter: http://datatables.net/usage/options#sDom . Something like "sDom": 'T<"clear">lfript', will put everything above the table.

    Also, no you can't specify it twice. That would be like:

    [code]
    var i = 0;
    i = 1;
    [/code]
    and expecting 'i' to contain both 0 and 1. You need to combine the two methods you've got at the moment into one. The documentation for sDom should help.

    Allan
This discussion has been closed.