I have a dynamically generated table on the server with varying column numbers and names. I want to provide user an option to copy a particular column by name (which is always present). Somehow it is not working. It comes back with 0 records exported.
I have posted an example at http://live.datatables.net/rumewuko/1/edit
The relevant javascript portion is below. I am suspecting that my columns syntax is not write but can't say for sure?
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
{ extend: 'copy', className: 'btn btn-primary' },
{ extend: 'csv', className: 'btn btn-primary' },
{ extend: 'excel', className: 'btn btn-primary' },
{
extend: 'copy',
text: 'Copy Office',
className: 'btn btn-primary',
header: false,
exportOptions: {
columns: ['Office:name']
}
}
]
} );
} );
</script>
Also is it possible to add some space between the buttons? Even though I have overwritten the style it seems to carry the default style and does not leave any space between buttons.