I want to use Print ,exportToPdf, button with Column Filter in Datatable .
I want to use Print ,exportToPdf, button with Column Filter in Datatable .

Hi, I want to use Print ,exportToPdf, button with Column Filter in Datatable .
the problem is code run fine but not showing button.
here is my code.
<script>
$(document).ready(function () {
// Setup - add a text input to each footer cell
$('#<%= GridView1.ClientID %> thead tr').clone(true).appendTo('#<%= GridView1.ClientID %> thead');
$('#<%= GridView1.ClientID %> thead tr:eq(1) th').each(function (i) {
var title = $(this).text();
$(this).html('<input type="text" placeholder="Search ' + title + '" />');
$('input', this).on('keyup change', function () {
if (table.column(i).search() !== this.value) {
table
.column(i)
.search(this.value)
.draw();
}
});
});
var table = $('#<%= GridView1.ClientID %>').DataTable({
orderCellsTop: true,
fixedHeader: true,
dom: 'Bfrtip',
buttons: [
'print',
'excelHtml5',
'csvHtml5',
'pdfHtml5'
]
});
});
</script>
EDIT: Updated to format code using Markdown.
This discussion has been closed.
Replies
Please format your code using Markdown.
Likely you are missing some or all of the Buttons JS and/or CSS files. You can use the Download Builder to generate the proper set of includes.
If this doesn't help then we would need a link to your page or a test case replicating the issue. Without seeing what you are doing it would be difficult to troubleshoot.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin