problem with buttons and layout with tabletools library
problem with buttons and layout with tabletools library
dthemes
Posts: 11Questions: 6Answers: 0
Hi,
I tried to use table tools library but I have an issue. Buttons is not showing up and also the layout is incorrect. I want the button to be on top on search box.
Please see the capture below :
http://picpaste.com/domo-asH7pSu1.png
Version:
- DataTable 1.10.6
- TableTools 2.2.4
- Jquery 1.11.1
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="js/dataTables.tableTools.js"></script>
$.getJSON("http://" + SERVER + "/ldata/log", function( data ) {
$(document).ready(function() {
$('#log').html( '<table class="display compact" id="log-data" width="100%"></table>' );
$('#log-data').dataTable( {
"sDom": 'T<"clear">lfrtip',
"tableTools": {
"sSwfPath" : "http://cdn.datatables.net/tabletools/2.2.2/swf/copy_csv_xls_pdf.swf"
},
"data": data['tbody'],
"columns": data['thead'],
"lengthMenu":[[25,200,500,-1],[25,200,500,"All"]],
});
});
});
Is something wrong with the code ? (surely yes...)
This discussion has been closed.
Answers
Hi,
You can putt the diffrent elements in Div's and then style with css.
You can try this :
and then in your css :
This worked for me. Hope it helps you.
Yves
Hi,
Thank you for your answer but unfortunately its not working. That's strange because even the button are not taking into account SWF file (from the CDN). :(
Hmm...url image expired here a new one :
http://picpaste.com/domo-6vuuOWdO.png
Hi,
Have you inserted the tableTools css file?
http://cdn.datatables.net/#TableTools
Can you post a test case? Without that help is very difficult.
Yves
Hi Zodiacs,
Sorry to not showing up more source code. I just took a look to dataTables.tableTools.min.css file and effectively I forgot it.
I added it and everything is working fine.
Thank you