How to manipulate sDom
How to manipulate sDom
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/
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/
This discussion has been closed.
Replies
Allan