tabletools

Export data from datatable with select element exports each option from the select element

眉间皱痕 提交于 2019-12-12 07:15:49
问题 I am try to add export buttons to my datatable, my table include select boxes inside, the problem is - it export all the options values included in the select box... A am using ajax to get results from the server then manipulate different data before render using dataSrc function like so: dataTableInit: function (columns_def) { var me = this; me.dataTable_obj = $('#leads_table').DataTable({ "pageLength": per_page, dom: 'Blfrtip', buttons: [ 'copy', 'csv', 'excel', 'pdf', 'print' ], "order":

DataTable TableTools initialisation

怎甘沉沦 提交于 2019-12-12 04:36:03
问题 With following imports, I have my datatable functioning: <!-- DataTables CSS --> <link rel="stylesheet" type="text/css" href="<c:url value="css/jquery.themeroller.css" />" /> <!-- TableTools CSS --> <link rel="stylesheet" type="text/css" href="<c:url value="css/TableTools_JUI.css" />" /> <!-- jQuery --> <script type="text/javascript" charset="utf8" src="jQuery/jquery-1.8.2.min.js"></script> <!-- DataTables --> <script type="text/javascript" charset="utf8" src="jQuery/jquery.dataTables.min.js"

datatables tabletools -> export only selected rows

妖精的绣舞 提交于 2019-12-11 10:02:05
问题 I am using datatables with tabletools on a large table which is filled via ajax request. When user selects several rows, it shows them as selected in the table. How can i tell the csv/xls export to ONLY export the selected rows? Thanks in advance 回答1: Stupid me... Just got it: { "sExtends": "csv", "bSelectedOnly": true } 回答2: If for somebody like me bSelectedOnly is not working (e.g always all rows are copied when only certain selected), before you burn into cry, just check if your run 2.2.3

jQuery dataTables : Export with newline / break in cell, using jQuery

不打扰是莪最后的温柔 提交于 2019-12-11 08:32:30
问题 I´m trying to generate an exportable datatable with the plugin "jquery.dataTable". But for design reasons I need linebreaks inside the cells. For the HTML view I simply use <br> , but if I try to export this f.e into a PDF, it will cause to break the output from the first occurring br, so I googled around and tried to pre-process the data and replace breaks with newline characters but this will cause the PDF export to break at the first br for even a lot of rows. I have no idea. Here's the

What to put as swf file in TableTools

女生的网名这么多〃 提交于 2019-12-11 03:36:08
问题 I'm a very new programmer with no experience with tabletools or swf paths whatsoever. I'm trying to implement Table Tools to print/export/etc but so far only print is working for me. Most solutions have said that means the swf path is incorrect. But I have no idea what to put as my swf path. Could anybody please help? Sorry for such a basic question. :( Here are my plugins and script for dataTables: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href=

Remove <span> from column on XLS export

久未见 提交于 2019-12-11 03:26:20
问题 I have a working jQuery DataTable (https://www.datatables.net/) using the TableTools plug-in with <span> elements in every row of one of the columns. On clicking the export button, I would like to hide/remove the <span> elements from the exported file. Not remove the whole columns, but just the <span> elements within that column. How can I achieve this? I understand how to remove an entire column from the export, but I have not found a way to remove particular elements from the export. Thanks

Datatables TableTools multiple tables on the same page

时光怂恿深爱的人放手 提交于 2019-12-07 03:43:49
问题 I am having problems with multiple instances of DataTables and TableTools on the same page. The DataTables are working fine, but when using TableTools only the first table is working fully with the buttons. All buttons are appearing fine on all tables but when you click a button it does nothing. (apart from 'Print' button works on all 4 tables). Does anybody have any ideas why this is happening? I have been searching for a solution but not found any. <script type="text/javascript"> jQuery(

How to replace button with icon in table tools in data table?

删除回忆录丶 提交于 2019-12-06 10:49:09
问题 I have a download button and when the download button is clicked the options will be displayed. But I have to replace this with hamburger icon. How can I achieve that When I click the hamburger icon, the options should be displayed : The download button must be changed to hamburger icon When I click the button, the options must be displayed Is there any way to achieve this ? This is my datatable code: $(document).ready(function () { $('#ItemTable').DataTable({ responsive: true, scrollX: true,

TableTools export not working in DataTables on multiple JQuery tabs

。_饼干妹妹 提交于 2019-12-06 08:29:14
问题 I am using DataTables-1.8.2, TableTools-2.0.1 and JQuery-1.6.4 to display a table on each of three jQuery tabs. TableTools provides the Copy/Excel/PDF/Print export features for the table and it works great on the first table on the first tab only. On the other two tabs, the buttons are displayed, but none of them do anything except the Print button (this is because the Print button does not use the same Flash-based method). Paths should not be an issue (I know the .swf path is a common

how to disable a DataTables/TableTools button

╄→尐↘猪︶ㄣ 提交于 2019-12-06 03:14:08
问题 I'm using DataTable 1.10 and TableTools 2.2.1. Given the following snipped I would like to disable/enable the edit-button. var myTable = $("#myTable ").DataTable({ tableTools : { "aButtons" : [ { "sExtends" : "text", "sButtonText" : "Edit", "fnClick" : function(nButton, oConfig, oFlash) { /* some stuff */ } }] } }) Is there a possibility to do this at runtime? Thanks a lot 回答1: This was a good question! Seems that the fnClick in dataTable.tabletools().fnSettings().buttonSet[id].fnClick only