Buttons: Too many iteration error Covis
Buttons: Too many iteration error Covis
rpandey
Posts: 4Questions: 1Answers: 0
I get "Too many iterations" error when I try to use "colvis". Not sure what is wrong.This is how I am using it. I also included the colvis.js and .css files but the colvis button doesnot show up.
var degtable = $('#degtable').DataTable({
dom: 'Bfrtip',
buttons: [{
extend: 'csv',
text: 'csv export'
},
{
extend: 'excel',
text: 'excel export',
exportOptions:
{
columns: ':visible'
}
},
{
extend: 'colvis'
}
]
});
Any help is ppreciated
This discussion has been closed.
Answers
How many columns does your table have?
And @allan, actually curious about this... how many Columns does ColVis support? (Or DT in general?)
Is there ANY column limit restrictions? For any of the plugins/extensions?
@rpandey Try to reproduce your error on http://live.datatables.net or/and create a debug thingy ( https://debug.datatables.net/ )
table has 6 columns. export buttons show up but not the colvis
ok. Can you create a live.datatables.net instance? SHould be able to copy and paste your code
Or atleast a debugger. You're giving very little info to go on
The reason I am not able to use live.datatables.net instance is that along with buttons I also need to use the plugins/extensions - jszip.min.js and buttons.html5.min.js files for the excel and csv export. I am not sure how I can use them live.datatables.net .
will try to explain here-
I am using jszip.min.js and buttons.html5.min.js along with buttons to provide the feature for exporting data. This works correctly. I wanted to use "colvis" to allow the functionality for user to select the columns to include in exporting data. but when I use "colvis" I see the console wrror - "Too many iterations" and it messes up the datatable. Here is the js code I am using on the table.
var degtable = $('#degtable').DataTable({
dom: 'Bfrtip',
buttons: [{
extend: 'csv',
text: 'csv export'
},
{
extend: 'excel',
text: 'excel export',
exportOptions:
{
columns: ':visible'
}
},
{
extend: 'colvis'
}
]
Like you would do on any web page - just include them using a script tag. Or use the download builder to create the URLs for you and paste them in.
We will need a test case to be able to offer any help here as this should work.
There is no limit. Browser performance will degrade after a while of course, but there is no hard limit in the code.
Allan