jquery-datatables

How set AND condition to ALL columns - php

梦想与她 提交于 2019-12-02 06:04:15
问题 In MY TABLE if I type floor fly table returns No matching records because Global Search php function search records inside a SINGLE column. But I want that AND condition works to ALL columns. If I type floor fly table should me display something like: |__Column1___|___Column2____|__Column4_| | | | | |..FLOOR... |DREAMS - FLY | 1994 | | ..dreams | xyz | floor | Attention: this is not a OR function abc OR cde This is my php code but AND don't work like as I expect: static function filter (

Fixed rows sorting in datatables

♀尐吖头ヾ 提交于 2019-12-02 04:51:02
问题 I want to establish some fixed rows in head of the datatable. This is my datatable settings: var oTable = $('#transactions').dataTable( { "aaSorting": [ [0,'desc'] ], "bFilter": false, "bSort": true, "aaSorting": [[3,'desc']], // default search colums // "aaSortingFixed": [[3,'desc']], "bPaginate": true, "bProcessing": true, "sPaginationType": "full_numbers", "asStripeClasses": [ 'monitoring-table-new' ], "bAutoWidth": false, "aoColumns": [ { "sType": "custom", "sClass": "td-date-size-cell",

Export to Excel not working when deployed

落爺英雄遲暮 提交于 2019-12-02 04:10:11
This is the code I used to create a data table with export functionality. oTable = $("#tblSearch").DataTable({ "jQueryUI": true, "sPaginationType": "full_numbers", "iDisplayLength": 10, "bSort": true, "aaSorting": [[0, "desc"]], "lengthMenu": [[5, 10, 25, 50], [5, 10, 25, 50]], "autoWidth": true, "scrollCollapse": true, "dom": 'T<"clear">lfrtip', "tableTools": { "sSwfPath": "../../swf/copy_csv_xls.swf", "aButtons": ["xls"] } }); Export is working in my local but when I deployed in server, the button does not appear. Change the sSwfPath to an absolute path. "tableTools": { "sSwfPath": "http:/

Using DataTables, how to specify an element inside a <td> to be searched

我的未来我决定 提交于 2019-12-02 03:27:33
问题 I'm using jquery DataTables, and I have a table with cells, each <td> contains a <span> and a hidden <select> , now all I want is to filter on just the text inside the <span> not the whole content of the <td> which also contains the hidden <select> element. I'm using basic DataTables configuration: $(document).ready( function () { $('#table_id').DataTable(); } ); I've been trying for a couple of days now on this site, Datatables site , googling, but couldn't find an answer, so please help

How to export Datatables table to Excel which works in IE as well

こ雲淡風輕ζ 提交于 2019-12-02 02:31:27
I am using var tableToExcel = (function() { var uri = 'data:application/vnd.ms-excel;base64,' , template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}<

Show a row on the last page of a paginated jQuery datatable

こ雲淡風輕ζ 提交于 2019-12-02 02:22:44
I want to make a hidden row visible when the last page of the datatable is clicked.How can I do this? I could not find the method to get the current page number and the last page number of Jquery Datatable pagination. This is what I want to do,but I dont have any idea abt how to get current page and last page. $( "#paginate_button" ).click(function() { if(.......){ //if clicked page number= last page $( "#hidden_row" ).show(); else $( "#hidden_row" ).hide(); }); davidkonrad First, implement the wellknown [fnPagingInfo][1] "plugin". Eg add the following to your code : $.fn.dataTableExt.oApi

Using DataTables, how to specify an element inside a <td> to be searched

微笑、不失礼 提交于 2019-12-02 02:00:43
I'm using jquery DataTables, and I have a table with cells, each <td> contains a <span> and a hidden <select> , now all I want is to filter on just the text inside the <span> not the whole content of the <td> which also contains the hidden <select> element. I'm using basic DataTables configuration: $(document).ready( function () { $('#table_id').DataTable(); } ); I've been trying for a couple of days now on this site, Datatables site , googling, but couldn't find an answer, so please help Thanks in advance The code is generated on server, but the resulting table is something like this: Please

Dynamically get column names in $aColumns arrary in datatables

筅森魡賤 提交于 2019-12-01 18:58:23
First I'll mention what I am trying to achieve. I am using CodeIgniter framework of PHP. I have 5 tables in my database and I want to display them in Datatables format on a button click on the display page. I am using server side processing php as data source. So at first I made the code for displaying only one table in Datatable format and was successful in it. Now I want to display one table at a time out of 5 on button click event. But $aColumns length should be equal to number of columns defined in HTML table. Now considering marks tabe, it has 4 columns student_id, exam_id, subject_id and

jQuery TableTools not working

谁说胖子不能爱 提交于 2019-12-01 14:21:40
I have downloaded example from TableTools. Which is working fine. what i did is i copied the content of the index.html to another file and associated every path. Flash loaded fine but except print button every control is disabled. What could be the issue. <title>TableTools example</title> <style type="text/css" title="currentStyle"> @import "http://localhost/media/css/demo_page.css"; @import "http://localhost/media/css/demo_table.css"; @import "http://localhost/TableTools/media/css/TableTools.css"; </style> <script type="text/javascript" charset="utf-8" src="http://localhost/media/js/jquery.js

jQuery TableTools not working

假装没事ソ 提交于 2019-12-01 13:09:16
问题 I have downloaded example from TableTools. Which is working fine. what i did is i copied the content of the index.html to another file and associated every path. Flash loaded fine but except print button every control is disabled. What could be the issue. <title>TableTools example</title> <style type="text/css" title="currentStyle"> @import "http://localhost/media/css/demo_page.css"; @import "http://localhost/media/css/demo_table.css"; @import "http://localhost/TableTools/media/css/TableTools