How to put "print" "Excel" "PDF" "CSV" buttons on left side of table ?

How to put "print" "Excel" "PDF" "CSV" buttons on left side of table ?

dabhi_mayurdabhi_mayur Posts: 4Questions: 0Answers: 0
edited December 2011 in General
Hello ! i want to put options for exporting data.
When i put buttons , it comes on right hand side on screen.
I want it on left hand side of table.
My code look likes....


$(document).ready(function () {
$('#grdQue').dataTable({
"bFilter": false,
"bInfo": false,
"bAutoWidth": false,
"bLengthChange": false,
"sDom": '<"H"Tfr>t<"F"ip>'

});
});


Using above code the buttons for exporting comes on right side of screen , not even on right side of table.
I want to display buttons on top-left side of table.
Can anybody help me out ?

Thanks.

Regards,
Mayur Dabhi

Replies

  • allanallan Posts: 63,116Questions: 1Answers: 10,397 Site admin
    A trivial CSS change will do this. Just remove the "float:right" from "div.DTTT_container" in my demo CSS.

    Also there is an example with the toolbar integrated with jQuery UI theming here, with it on the top left: http://datatables.net/release-datatables/extras/TableTools/theme.html

    Allan
  • dabhi_mayurdabhi_mayur Posts: 4Questions: 0Answers: 0
    Thanks allan.
    It works for me.

    div.DTTT_container {
    /*float: right;*/
    margin-bottom: 1em;
    }
This discussion has been closed.