The TableTools don't appers in screen

The TableTools don't appers in screen

rlanhellasrlanhellas Posts: 16Questions: 0Answers: 0
edited May 2013 in TableTools
Well, i'm doing the code above to show the TableTools but the buttons don't appers, and don't show any errors.
[code]
$('#consultar_fornecedor').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"oTableTools": {
"sSwfPath": "../../js/DataTables-1.9.4/extras/TableTools/media/swf/copy_csv_xls.swf",
"aButtons": ["copy", "csv", "print"]
},
"oLanguage": {
"sLengthMenu": "Mostrar _MENU_ registros por página",
"sZeroRecords": "Nenhum registro encontrado",
"sInfo": "Mostrando _START_ / _END_ de _TOTAL_ registro(s)",
"sInfoEmpty": "Mostrando 0 / 0 de 0 registros",
"sInfoFiltered": "(filtrado de _MAX_ registros)",
"sSearch": "Pesquisar: ",
"oPaginate": {
"sFirst": "Início",
"sPrevious": "Anterior",
"sNext": "Próximo",
"sLast": "Último"
}
},
"aaSorting": [[0, 'desc']],
"aoColumnDefs": [
{"sType": "num-html", "aTargets": [0]}

]
});
[/code]

Replies

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Link to a test page please.

    Allan
  • rlanhellasrlanhellas Posts: 16Questions: 0Answers: 0
    Allan, the system is INTRANET.
  • rlanhellasrlanhellas Posts: 16Questions: 0Answers: 0
    I changed to web-server and sent a particular mensage for you.
  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Thank you for the link. You aren't loading the TableTools Javascript file, nor is TableTools being initialised on the page.

    That's probably why TableTools isn't appearing on the page :-)

    Allan
  • rlanhellasrlanhellas Posts: 16Questions: 0Answers: 0
    So, now the tableTools Buttons is visible in page but when i clicked in EXCEL , PDF ou CSV nothing happen.
  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Looks like you need to add:

    [code]
    .DTTT_button { position: relative }
    [/code]

    to your CSS.

    Allan
  • rlanhellasrlanhellas Posts: 16Questions: 0Answers: 0
    Well, now it's working but i still have some doubts:

    1 - How can i change the file's name before save ?
    2 - As you can see in my DataTable i have 6 columns. The last column is only to CRUD action and i don't wanna it appear on EXCEL, PDF o any TableTools's export. How can i do it ?
  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    1. Use the sFileName option. Documentation: http://datatables.net/extras/tabletools/button_options#sFileName

    2. You'd need to use a custom filter (i.e. modify TableTools). At the moment it simply outputs all rows.

    Allan
  • rlanhellasrlanhellas Posts: 16Questions: 0Answers: 0
    Thanks for help Allan.
This discussion has been closed.