tabletools

Datatable unable to export updated checkbox values in excel as 0 or 1, alway showing the initially checked values only

て烟熏妆下的殇ゞ 提交于 2021-01-28 18:19:30
问题 Trying to download Datatables, able to get 0 or 1 values for checkboxes (for one of the column fields "Verified") initially, but when I am toggling the checkbox and exporting as excel, unable to retrieve the latest check box values. Initially I only had the second checkbox as not ticked in the database so its correctly exporting its values as 0 in the excel sheet but when I change the values and export it again its not taking the updated latest values as you can see in the snapshot attached

How to conditionally display TableTools buttons

混江龙づ霸主 提交于 2020-01-11 13:04:53
问题 I'm using jQuery DataTables and TableTools extension to display buttons in table header. But is there an option to show button when some condition is met? My table initialization code is shown below: projectsTable = $('#projects_table').DataTable({ "dom": '<"cleaner">lf<"cleaner">T<"cleaner"><"cleaner">rtip', "stateSave": true, "data":tableData, "bSortCellsTop": true, "responsive": true, "autoWidth": false, "tableTools":{ "aButtons": [ { "sExtends": "text", "sButtonText": "New project",

How to conditionally display TableTools buttons

半城伤御伤魂 提交于 2020-01-11 13:04:31
问题 I'm using jQuery DataTables and TableTools extension to display buttons in table header. But is there an option to show button when some condition is met? My table initialization code is shown below: projectsTable = $('#projects_table').DataTable({ "dom": '<"cleaner">lf<"cleaner">T<"cleaner"><"cleaner">rtip', "stateSave": true, "data":tableData, "bSortCellsTop": true, "responsive": true, "autoWidth": false, "tableTools":{ "aButtons": [ { "sExtends": "text", "sButtonText": "New project",

Datatables / TableTools: format data as text when exporting to Excel

半腔热情 提交于 2020-01-10 02:59:28
问题 I am using the Datatables TableTools plugin in order to provide an Export to Excel option for a table on my page. In general everything works as intended. My only issue is that I would need all the data resp. the columns in the resulting Excel table being formatted as text as otherwise I am losing data in some columns. Examples: - I have a column that has leading zeros (e.g. 0022 ) which only appears with the leading zeros cut off (e.g. 22 ) in the Excel file if this is not formatted as text.

Custom MySQL query for jquery dataTables

谁说我不能喝 提交于 2019-12-25 06:56:07
问题 the problem here is the dataTables pagination is not working this is the script i created that outputs json from the database include( "../database.php" ); $q = $dbh->prepare("SELECT r.studid, r.firstname, r.middlename, r.lastname, r.Enrolling, c.courseid,c.code, s.status,s.dateapproved,s.approvedby FROM pcc_registration r, pcc_courses c, pcc_studentsubj s WHERE c.courseid= r.Enrolling AND s.studentid=r.studid AND r.status=? AND s.status=? GROUP BY r.studid"); $q->execute(array(1,2)); $rows =

DataTables TableTools images not working with ThemeRoller

梦想与她 提交于 2019-12-25 03:25:03
问题 I have tabletools up and running with datatables and it works great. The only problem I am having is icons for the tabletools buttons. When they are outside the header div using "sDom": 'T<"clear"><"H"lf>rt<"F"ip>' the icons show up just fine, when I put the tabletools inside the header, the icons dont show up "sDom": '<"H"lTf>rt<"F"ip>' The image illustrates both combined "sDom": 'T<"clear"><"H"lTf>rt<"F"ip>' 回答1: I have the same problem when i use "bJQueryUI": true, i may think there is a

Datatables TableTools - Not able to find the path for sSwfPath

孤街浪徒 提交于 2019-12-24 12:39:27
问题 I am using codeigniter framework to build my web application. I need to export my table from datatables to csv and excel. But I am getting an error while loading the sSwfPath in the datatables TableTools : I have included the following libraries : <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://localhost/codegen/assets/js/jquery.dataTables.js" type="text/javascript"></script> <script src="http://localhost/codegen/js/jquery.dataTables

TableTools plugin export buttons are not working

我怕爱的太早我们不能终老 提交于 2019-12-18 09:48:09
问题 I am using TableTools for export functionality but it is not working. Only print buttin working and shows pop up and hide. I have got suggestions from this thread but did not given clear idea to me. Below is my implementation $('#example').dataTable({ "sDom": 'T<"clear">lfrtip', "oTableTools": { "sSwfPath": "copy_csv_xls_pdf.swf" } }); I have kept .swf file in the same folder where my server page is exist. Also I tried with "sDom": 'T<"clear"><"H"lfr>t<"F"ip>', . But not worked for me. Also I

DataTables TableTools buttons not working correctly (simple example)

两盒软妹~` 提交于 2019-12-17 22:00:03
问题 I am trying to use the newest tableTool 2.2.0 and i have made a little and simple example jsfiddle.net/9ZTGb/ COPY and PRINT buttons seems to respond, but the "Copy" is resulting "blank", and "CSV","Excel","PDF" seems not workinkg at all.. this is the table: <table id="tblExport" class="table table-condensed"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Larry</td> <td>Smith</td> <td>@lsmith</td>

Data Tables download xls/csv file not working properly

社会主义新天地 提交于 2019-12-12 17:09:01
问题 I want to have 3 buttons - to download csv, xls and pdf file. In my case when I click on the download csv file button, it saves with extension of csv file, but when I open it it is excel - it's not comma separated file. PDF download button is working correctly. xls button does not work - it's not clickable at all. I tried to write this code: "TableTools": { "aButtons": [ { "sExtends": "download", "sButtonText": "Download XLS", "sUrl": "/generate_xls.php" }] } But then each button download