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.
**See below what i'm trying to achieve

$(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">>'



  • allanallan Posts: 62,377Questions: 1Answers: 10,234 Site admin
    You just need to change the order of the options in your sDom parameter: . Something like "sDom": 'T<"clear">lfript', will put everything above the table.

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

    var i = 0;
    i = 1;
    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.

This discussion has been closed.