I change the pagelength in datatable but not show the export buttons in datatable
I change the pagelength in datatable but not show the export buttons in datatable
itteambgs
Posts: 11Questions: 2Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
pls reply for my qn
Please link to a test case, as required in the forum rules and the template text that you didn't fill in.
Allan
Hi All,
I am using datatables version : **1.10.24 **
I want to change default pagination to 500 / page for this I have included below script as
$('#example1').dataTable( {
"pageLength": 50
});
unfortunately export button like excel, pdf,print & copy are hidden or not showing.
how to fix it. This is my first post if any thing wrong apologize it.
1.10.24 is three years old and no longer supported. I would suggest you update to the current release - 2.0.3.
That said, I see nothing in your confirmation that would make the Buttons show. I would have expected the use of the
dom
parameter, or perhaps a use of the API to insert the buttons after initialisation.Without a test case it is impossible to say for sure what is wrong.
Allan
Hi all,
I had change the upgrade version for datatable . I get answer all data rows shows in one page.Thank you.
But I need add the export buttons are excel,pdf,print and coloumn visibility .
Can any one pls reply for me?
You sometimes need to wait more than 9 minutes for a reply before bumping a post.
You haven't provided a test case, as previously asked for, so I don't know why the export buttons wouldn't be showing for you.
This example shows how to get the export buttons to display.
If you are having problems with that, please provide a test case.
Allan
i was use for upgrade version cdn .
Then i used some script codes for show the export buttons .
I will show the codes below:
Edited by allan Syntax highlighting
I get the export buttons show and using the above code.
but didnot show the colvisHtml5 and printHtml5
what i code use for this
You'd need
for the print button.
For the column visibility button.
Use the download builder to make sure you get all the files you need.
Allan
css:
i used above the scripts for all data rows show in one page with show the export buttons .
But i am not till get the proper working function page.
And i using the script code blelow i give:
And i got the DataTables warning: table id=example1 - Cannot reinitialise DataTable. For more information about this error, please see https://datatables.net/tn/3 in this error in my page.
And shot showing th e colvis ,print buttons
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
I don't believe there are
colvisHtml5
andprintHtml5
button types. See the Built-in buttons doc for more details. Try this instead:Use the troubleshooting steps at the link in the error:
https://datatables.net/tn/3
If you need help with this then please post a link to your page or test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
DataTables warning: table id=example1 - Cannot reinitialise DataTable. For more information about this error, please see https://datatables.net/tn/3
how to i solve above problem in datatable
It sounds like you're initialising the table multiple times - that's the only reason why you'd get that error. You can call
destroy()
before re-initialising.But as Kevin said, please provide a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Colin