How to manipulate sDom

How to manipulate sDom

asdrubalasdrubal Posts: 16Questions: 0Answers: 0
edited August 2012 in General
Hello,

Here is my example of Table tools and filtering, all working fine except I cannot align "Show/hide button" with Table Tools buttons. Any idea how should I manupulate sDom? I'm thinking I should maybe try with custom DOM additions (http://datatables.net/examples/advanced_init/dom_toolbar.html) but don't really know how to start.

Here is what I've got so far:


[code]
$(document).ready( function () {
$('#example').dataTable( {
"bPaginate": true,
"bJQueryUI": true,
"sDom": 'W<"clear">T<"clear"><"H"lft><"F"ip>',
"oColumnFilterWidgets": {
"aiExclude": [ 0, 1, 2, 3, 5]
},
"oTableTools": {
"sSwfPath": "/DataTables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",

"aButtons": [
"copy",
"csv",
"xls",
{
"sExtends": "pdf",
"sTitle": "Report Name",
"sPdfMessage": "Summary Info",
"sFileName": "Users.pdf",
"sPdfOrientation": "landscape",
"mColumns": [ 0, 1, 2, 3, 4 ]
},
"print"
]

}

} );
} );
[/code]

And image of what I'm trying to achieve:
http://imageshack.us/photo/my-images/267/78543856.jpg/

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Most likely you need to add a float:left to the container of those filtering buttons. IF you can give us a link that would be helpful.

    Allan
  • asdrubalasdrubal Posts: 16Questions: 0Answers: 0
    I can get the desired effect by adding [code]margin-top: -2.5em;[/code] to [code]div.DTTT_container[/code] but I would rather have it done through sDom if possible.
This discussion has been closed.