Csv button not showing
Csv button not showing
mgi
Posts: 14Questions: 6Answers: 1
Hi, I have defined following table but somehow export to csv button is not showing.
var dom = "<'row'<'col-sm-2'l><'col-sm-6'B>>"
+ "<'row'<'col-sm-12'tr>>"
+ "<'row'<'col-sm-5'i><'col-sm-7'p>>";
var buttons = [
{extend : 'create', editor : editor},
{extend : 'remove', editor : editor},
'selectAll', 'selectNone', 'colvis', 'colvisRestore', 'csv'];
var dt = $wnd.$(el).DataTable({
columns : columns,
ajax : {
url : apiEndpoint
},
dom : dom,
processing : true,
serverSide : true,
select : {
style : 'os'
},
buttons : buttons,
});
I tried to create custom button and in onClick function call
$wnd.$(e).DataTable.ext.buttons.csv.action.call(this, e, dt, button, config);
but i got OperatorsView.java:175 Uncaught TypeError: Cannot read property 'call' of undefined
I am using DataTables 1.10.13 and Buttons 1.2.3
This discussion has been closed.
Answers
I suspect you want to use:
assuming that
$wnd
is yourwindow
object?Allan
still same error,
$wnd
is window object, I am using datatables with GWT,Can you link to the page so I can take a look and see what the problem is please?
Allan
I manged it with custom button and REST