Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all 1815 articles
Browse latest View live

Add second footer row showing totals for filtered rows and minding hidden columns

$
0
0
Hi, I'm currently able to build up an array of totals for all of my filtered rows, using the underscore:

        var totals = ['Filtered Totals:'];
        var rows = table._('tr', { "filter": "applied" });
        $(table.fnSettings().aoColumns).each(function (index, value) {
            var col = $(this.nTh);
            var total = null;
            if (col.data('total-type') == 'sum') {
                total = 0;
                for (var i = 0; i < rows.length; i++)
                {
                    total += parseInt(rows[i][index]);
                }
            }
            totals.push(total);
        });

However, with this array of new values I can't figure out how to add a new tfoot row.

I don't want to just append with jQuery as our system also allows dynamic hiding of columns (e.g. for smaller screens) so we would like datatables to be in control of the new footer row (in the same way that it takes care of hiding columns in the existing footer row)

Any ideas?

Search doesn't work properly while typing initial text; works if I add an extra letter & delete it

$
0
0
I have a simple datatable with Bootstrap2 from the example.

When I enter a search for 'Cruz', and the table displays no results even though there is a name 'Cruz'. When I add any letter and then delete that letter, the table shows the record properly.

Does anyone know why this may be? Is it something I could change in my configuration to fix it so the initial search works the same way?

http://wheresmyconcrete.herokuapp.com/clients - See the issue in action here

debug code: ikehar http://debug.datatables.net/ikehar

Thanks!

Here is my configuration:

<script>
  $.extend(true, $.fn.dataTable.defaults, {
    "sDom": "<'row-fluid'<'span9'l><'span3'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
    "sPaginationType": "bootstrap",
    "oLanguage": {
        "sLengthMenu": "_MENU_ records per page"
    }
  });
  $.extend( $.fn.dataTableExt.oStdClasses, {
    "sWrapper": "dataTables_wrapper form-inline"
  });
  $.extend($.fn.dataTableExt.oPagination, {
    "bootstrap": {
        "fnInit": function(oSettings, nPaging, fnDraw) {
            var oLang = oSettings.oLanguage.oPaginate;
            var fnClickHandler = function(e) {
                e.preventDefault();
                if (oSettings.oApi._fnPageChange(oSettings, e.data.action)) {
                    fnDraw(oSettings);
                }
            };
            $(nPaging).addClass('pagination').append('<ul>' + '<li class="prev disabled"><a href="#">← ' + oLang.sPrevious + '</a></li>' + '<li class="next disabled"><a href="#">' + oLang.sNext + ' → </a></li>' + '</ul>');
            var els = $('a', nPaging);
            $(els[0]).bind('click.DT', {
                action: "previous"
            }, fnClickHandler);
            $(els[1]).bind('click.DT', {
                action: "next"
            }, fnClickHandler);
        },
        "fnUpdate": function(oSettings, fnDraw) {
            var iListLength = 5;
            var oPaging = oSettings.oInstance.fnPagingInfo();
            var an = oSettings.aanFeatures.p;
            var i, ien, j, sClass, iStart, iEnd, iHalf = Math.floor(iListLength / 2);
            if (oPaging.iTotalPages < iListLength) {
                iStart = 1;
                iEnd = oPaging.iTotalPages;
            } else if (oPaging.iPage <= iHalf) {
                iStart = 1;
                iEnd = iListLength;
            } else if (oPaging.iPage >= (oPaging.iTotalPages - iHalf)) {
                iStart = oPaging.iTotalPages - iListLength + 1;
                iEnd = oPaging.iTotalPages;
            } else {
                iStart = oPaging.iPage - iHalf + 1;
                iEnd = iStart + iListLength - 1;
            }
            for (i = 0, ien = an.length; i < ien; i++) {
                $('li:gt(0)', an[i]).filter(':not(:last)').remove();
                for (j = iStart; j <= iEnd; j++) {
                    sClass = (j == oPaging.iPage + 1) ? 'class="active"' : '';
                    $('<li ' + sClass + '><a href="#">' + j + '</a></li>')
                        .insertBefore($('li:last', an[i])[0])
                        .bind('click', function(e) {
                        e.preventDefault();
                        oSettings._iDisplayStart = (parseInt($('a', this).text(), 10) - 1) * oPaging.iLength;
                        fnDraw(oSettings);
                    });
                }
                if (oPaging.iPage === 0) {
                    $('li:first', an[i]).addClass('disabled');
                } else {
                    $('li:first', an[i]).removeClass('disabled');
                }

                if (oPaging.iPage === oPaging.iTotalPages - 1 || oPaging.iTotalPages === 0) {
                    $('li:last', an[i]).addClass('disabled');
                } else {
                    $('li:last', an[i]).removeClass('disabled');
                }
            }
        }
    }
});
if ($.fn.DataTable.TableTools) {
    $.extend(true, $.fn.DataTable.TableTools.classes, {
        "container": "DTTT btn-group",
        "buttons": {
            "normal": "btn",
            "disabled": "disabled"
        },
        "collection": {
            "container": "DTTT_dropdown dropdown-menu",
            "buttons": {
                "normal": "",
                "disabled": "disabled"
            }
        },
        "print": {
            "info": "DTTT_print_info modal"
        },
        "select": {
            "row": "active"
        }
    });
    $.extend(true, $.fn.DataTable.TableTools.DEFAULTS.oTags, {
        "collection": {
            "container": "ul",
            "button": "li",
            "liner": "a"
        }
    });
}
  $(document).ready(function() {
    $('#orders').dataTable({
        "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
        "iDisplayLength": 50,
        "sPaginationType": "bootstrap",
        "oLanguage": {
            "sLengthMenu": "_MENU_ records per page"
        }
    });
  });
</script>

Share: Pipeline splice of undefined

$
0
0
I use DataTables 1.9.4, Colvis 1.1.0-dev and columnFilter 1.5.6

UPDATE: See my post below (3rd comment)

Recently got issue "splice of undefined" with pipeline around:

json.aaData.splice( 0, iRequestStart-oCache.iCacheLower );
json.aaData.splice( iRequestLength, json.aaData.length );

I notice that at the same time the issue appear, the range input of columnFilter had value "undefined" because it's invisible before.

Since I'm new to dataTables and not advanced at javascript this is what I do:

Add method below before function fnDataTablesPipeline ( sSource, aoData, fnCallback )
function strpos(haystack, needle, offset) {
  //  discuss at: http://phpjs.org/functions/strpos/
  // original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
  // improved by: Onno Marsman
  // improved by: Brett Zamir (http://brett-zamir.me)
  // bugfixed by: Daniel Esteban
  //   example 1: strpos('Kevin van Zonneveld', 'e', 5);
  //   returns 1: 14

  var i = (haystack + '')
    .indexOf(needle, (offset || 0));
  return i === -1 ? false : i;
}

Change:
(aoData[i].value != oCache.lastRequest[i].value)

To:
if ( (aoData[i].value != oCache.lastRequest[i].value) || (strpos(aoData[i].value, 'undefined') !== false)) 

Basicly the code will catch any "undefined" word and set bNeedServer = true.
This not remove the "undefined" value in input filter, but at least bProcessing isn't stuck and the table show data.

This solve my problem but not sure if this will help others, so I hope anyone will found it usefull.

How can i change dataTable lable names language dynamically

$
0
0
Hi
I m using python, plone for my project. But i m new to dataTables, I cant find a way to change the dataTable label names like search, entries, first,last,etc. What i need to know is how can i change my dataTable label names language when a user changes language in plone site. I have .po files in Locales folder in which i created msgid's and msgstr for the strings to changes dynamically. And i can i use the .po file in html page to change label names dynamically as per user selection. But i cant able to change the language of dataTable label names. Can anyone help me to find the solution.

[Please Help] Row Selection with Fixed column

$
0
0
Dear Allen,

I am using datatable with fixed column plug in.
but when i click row on fixed columns, it doesn't select entire row but only selects Fixed column row.
could you please provide solution like 1. clicking fixed columns in row will select entire row or 2. disabling row select on fixed columns.

I haven't put link to test case as this is easy to produce scenario and am not working on live website. hope you will help without test case.

Thank You.

MySQL query result

$
0
0
Hello,

I'm new with Datatables, and I haven't figured ou how to show MySQL data in a datatable table. I'm trying to use the following code:

<html>
    <head>
        <script type="text/javascript" src="js/jquery-1.10.2.js"></script>
        <script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.10.4.custom.min.js"></script>
        <link rel="stylesheet" type="text/css" href="css/jquery.dataTables.css"/>
        <link rel="stylesheet" type="text/css" href="css/jquery-ui-1.10.4.custom.min.css"/>
        <link rel="stylesheet" type="text/css" href="css/jquery.dataTables_themeroller.css"/>
        <style>
            #myDiv{
                width: 800px;
            }
        </style>
        <script>
    $(document).ready(function() {
	
        $('#tb_data').dataTable( {
                "bProcessing": true,
		"bServerSide": true,
                "bDeferRender": true,
                "bLengthChange": false,
                "bJQueryUI": true,
                "bAutoWidth": false,
                "sPaginationType": "full_numbers",
                "sAjaxSource": "script/get_status.php",
                "aoColumns": [
                { "mDataProp": "radar"},
                { "mDataProp": "status"},
                { "mDataProp": "aeronaves"},
                { "mDataProp": "ultima"},
                { "mDataProp": "estacao"}
                ]                
     });
        
        jQuery.fn.center = function (){
            this.css("position","fixed");
            //this.css("top", ($(window).height() / 2) - (this.outerHeight() / 2));
            this.css("left", ($(window).width() / 2) - (this.outerWidth() / 2));
            return this;
        }

        $('#myDiv').center();
        $(window).resize(function(){
        $('#myDiv').center();
        });
        
    
        
    } );
        </script>
    </head>
    <body>
        <div id="myDiv">
        <table id="tb_data">
            <thead>
                <tr>
                    <th class="ui-state-default" style="width: 50px;">Estacao</th>
                    <th class="ui-state-default" style="width: 120px;">Status</th>
                    <th class="ui-state-default" style="width: 120px;">Aeronaves</th>
                    <th class="ui-state-default" style="width: 105px;">Atualizacao</th>
                    <th class="ui-state-default" style="width: 20px;">Radar</th>
                </tr>
            </thead>
            <tbody>
                    
            </tbody>
        </table>
        </div>
    </body>
</html>

PHP code

<?php

include 'database_connection.php';

$query_names = mysqli_query($dblink, "SET NAMES 'utf8'");

$query_stat = mysqli_query($dblink, "select NodeID AS Radar, (CASE WHEN (Connected = 1) THEN 'Ativo' ELSE 'Inativo' END) AS Status, CurrentTracks AS Aeronaves, Max AS Ultima_Atualizacao, StationID AS Estacao FROM serverStat order by Status, Radar Asc");

$data = array();
if ( $query_stat && mysqli_num_rows($query_stat) )
{
    while( $row = mysqli_fetch_array($query_stat, MYSQL_ASSOC) )
    {
        $data[] = array(
            'radar' => $row['Radar'],
            'status' => $row['Status'],
            'aeronaves' => $row['Aeronaves'],
            'ultima' => $row['Ultima_Atualizacao'],
            'estacao' => $row['Estacao']
        );
    }
}

echo json_encode($data);
flush();

?>

I'm getting the error bellow:

<TypeError: i is undefined>

Any help will be appreciated. Thanks!

Marcio

Using ThemeRoller. Not working

$
0
0
Hi all,

The ThemeRoller not working for me
Everything is the same as the source code of the web site at this page https://datatables.net/styling/themes/overcast
Is that someone could give me a proper initialization

Thank you

<link rel="stylesheet" type="text/css" href="./script/DataTables-1.9.4/media/css/demo_table_jui.css"/>
<link rel="stylesheet" type="text/css" href="./script/DataTables-1.9.4/media/css/overcast/jquery-ui-1.10.4.custom.min.css"/>
		
<style type="text/css" media="screen">
	.dataTables_info { padding-top: 0; }
	.dataTables_paginate { padding-top: 0; }
	.css_right { float: right; }
	#example_wrapper .fg-toolbar { font-size: 0.8em }
	#theme_links span { float: left; padding: 2px 10px; }
</style>

/* Jquery */		
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

/*The dataTable script*/
<script type="text/javascript" src="./script/DataTables-1.9.4/media/js/jquery.dataTables.js"></script>

<script type="text/javascript" charset="utf-8">
	$(document).ready( function() {
		$('#example').dataTable( {
			"bJQueryUI": true,
			"sPaginationType": "full_numbers"
		} );
	} );
</script>

mRender return object doesnt work ! why ?

$
0
0
I am trying to return an object in mRender function but datatable adds [object Object] string in column.
is it possible to return object ? because it can be helpful in structured coding to grab ref to object and use it later.

Works
{
      
        'bSortable': false,
        'aTargets': [0],
        'mRender': function (data, type, row) {
          return '<input type="checkbox" name="selectedbx[]" class="newcheckboxes" value="' + data + '">';
        }
}
 


Doesn't work . why ?
Benefit of returning object is that I can keep its refer in structured coding so i don't have to use jquery selectors to find it again.
{
      
        'bSortable': false,
        'aTargets': [0],
        'mRender': function (data, type, row) {
          return $("<input/>").attr({
            name: "selectedbx[]",
            value: data,
            type: "checkbox"
          }).addClass('newcheckboxes');
        }
}
 

[Please help] Datatables fixed with columns.

$
0
0
Can anyone help with the following problem? I’m trying to create a Datatable with fixed width columns.

1. If I specify 10px for the column width, Datatables resizes the columns to occupy the full page width.

2. If I specify an outer container. Datatables seems to set the column width close to the desired width.

Is there any way of forcing Datatables to set the correct width without the need for an outer container?

Thanks,

Sarb



<html>
<head>
<link href="http://cdnjs.cloudflare.com/ajax/libs/datatables/1.9.4/css/demo_table.css&quot; rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script&gt;
<script src="http://cdnjs.cloudflare.com/ajax/libs/datatables/1.9.4/jquery.dataTables.js"></script&gt;
<script type="text/javascript">
$(document).ready(function () {
$('.my-table').dataTable({
bAutoWidth: false,
aoColumnDefs: [
{
"aTargets": [0],
sWidth: '10px'

},
{
"aTargets": [1],
sWidth: '10px'
}
]
});
});
</script>
</head>

<body>
<!-- example 1 -->
<table class="my-table display">
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>

<!-- example 2 -->
<div style="width: 50px">
<table class="my-table display">
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

aData is undefined in datatables - tried everything on the forums here - none worked. Help plz?

$
0
0
I am using `1.9.4 -jquery.dataTables.js`. I get `aData is undefined` error. I have seen several posts that on this issue, I tried everything but none helped.

My `JSON object` that is returned is what datatables expects. it has "aaData" field which is an array of arrays. I am trying out with only one column to fix the bug.

I get a pop-up error-message on the browser

DataTables warning (table id = 'search_table'): list index out of rangelist index out of range

In the firebug console, I see

aData is undefined in 2038 at jquery.dataTable.js

for ( var i=0, iLen=aData.length ; i<iLen ; i++ )
{....

my json object;

{"result": "ok", "iTotalRecords": 5, "aaData": [["6200"], ["6900"], ["7500"], ["5800"], ["4600"]], "sEcho": 0, "iTotalDisplayRecords": 5}


my script:

<script type="text/javascript">
$(document).ready(function() {
var oTable = $('#search_table').dataTable( {
//"sDom": 'T<"clear">lrtip',
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/search/list",
//"aData":"aaData"
//"sAjaxDataProp": "aaData"
//"aoColumns":[
// {"mDataProp":""},
// {"mDataProp":"username"}
//]
//"aaSorting": [ [1,'desc'], [2,'desc'] ],
// Disable sorting for the Actions column.
//"aoColumnDefs": [ { "bSortable": false, "aTargets": [ 4 ] } ]
} );
} );
</script>

HTML:

<div class="well">
<table id="search_table">
<thead>
<th width="10%"><center>Title</center></th>

</thead>
<tbody></tbody>
</table><br>
</div>

severside processing does not work in datatables jquery?

$
0
0
Here is my code:

<script type="text/javascript">
$(document).ready(function() {
var oTable = $('#search_table').dataTable( {
"sDom": 'T<"clear">lrtip',
"oTableTools": {
"sSwfPath": "{% static "extras/copy_csv_xls_pdf.swf" %}",
"aButtons": [ "csv", "pdf", "print" ]
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "{% url 'search_list_json' %}",
"aaSorting": [ [2,'asc'], [1,'desc'] ],
// Disable sorting for the Actions column.
"aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0,4 ] } ]
} );
} );
</script>

Strangely, if comment-out "bServerSide": true", it works fine and my table is displayed nicely in HTML. but when I have it, I get `aData is undefined` error. what is the problem here and how to fix it?

The JSON object returned from server seems fine as per the format. it has aaData

{"result": "ok", "iTotalRecords": 1, "aaData": [["<center><a href=\"/search/1\"><font color=\"red\">Mazda=>626:2012-1986</font></a>\n </center>", "04/07/2014", "10000", "1000", "<center><a href='/search/update/1/'><img src='/static/images/icons/icon_changelink.gif'></a>&nbsp;<a href='/search/delete/1/'><img src='/static/images/icons/icon_deletelink.gif'></a></center>"]], "sEcho": 0, "iTotalDisplayRecords": 1}

Thanks

Getting filtered/unfiltered rows when using deferred rendering

$
0
0
I know this subject has come up in the past, but I'm hoping that I might be able to dig out more insight on this as I haven't been able to find a real solution...

I'm using Datatables 1.9.4. I have a table that can potentially be very large. I used deferred rendering to help speed things up a bit. It's not big enough to justify serverside rendering, but it's big enough that it can bog things down a bit. The table is paginated and will be paged with most data sets. In any case, I find myself needing to retrieve all unfiltered rows of the table. Naturally, this won't work with any sort of standard selector as anything past the first page is not rendered and cannot be selected. I can't really post a link to it as it's not public.

The usual suspects aren't effective, such as table._('tr', {"filter":"applied"}). I've dug through the documentation and the table itself in Firebug, but with no luck on finding anything that could be definitively used short of grabbing the original data, grabbing all of the filters, and filtering it all over again manually, which is hardly ideal. To add to the fun, there's a global table filter along with individual column filters.

Is there any avenue to dig into the Datatable and extract this data? Datatables is definitely aware of rows that haven't been rendered yet. It knows how many rows in total there are when filtering regardless of unrendered rows. Is there any way that this data could be used to extract the filtered or unfiltered rows from the original dataset? Indexes or certain row identifiers within the data would work out just fine. Datatables must contain some kind of data on these unrendered and filtered rows tucked away somewhere.

datatable not showing all the entries?

$
0
0
In total, I have 11 records, but the table is showing only 10 entries. It also displays "Showing 1 to 10 of 10 entries", but there are 11 entries.
The "next button" also does not work. what is wrong here? Please help
Here is my code:
<script type="text/javascript">
$(document).ready(function() {
var oTable = $('#search_table').dataTable( {
"sDom": 'T<"clear">lrtip',
"bProcessing": true,
//"bServerSide": true,
"sAjaxSource": "{% url 'search_list_json' %}",
"aaSorting": [ [2,'asc'], [1,'desc'] ],
// Disable sorting for the Actions column.
"aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0,4 ] } ],
"iDisplayLength":50
} );
} );
</script>
JSON object: (I have reduced aaData for simplicity)
{ "iTotalRecords": 11, "aaData": [[ .....], [....]], "sEcho": 0, "iTotalDisplayRecords": 11}

server side load with custom columns

$
0
0
Is it possible to do a server side load of a table with custom buttons . This is my table, I have a custom column called actions where I load the actions button depending on a flag on the data for the current row. And another thing I couldn't find an example of the JSON format that must be returned to datatables.

http://i.imgur.com/MGCebf9.png

Sorting issue with pagenating in server side processing

$
0
0
Hello there! I am using server side processing with paginating and sorting turned on and managed to get the paging working on a very large data set (>2.4 million rows).

However, I've had problem with sorting. No matter which page I am on, if I click on one of the sort buttons, it will always jump to the first page. Debugging the code revealed that it was caused by the iDisplayStart parameter - it is always set to 0 if the call is originated from the sorting button - thus jumping to page 1. Please help me out!

Another issue I ran into (and solved) was that I need to pass a large number of parameters to the server in the ajax call (for fhServerData). Originally I used $getJSON(...) as the ajax call by following the server side processing example on this site. I found that as the amount of data I pushed into aoData exceeding certain amount, the Datatables grid would just hang there (displaying a Processing... image but doing nothing). After some painful try and error cycles and some googling, it seemed that there is a size limitation somewhere jQuery that prevent Datatables from functioning. I changed the server to accept HTTP POST instead of HTTP GET and replaced $.getJSON(...) to $.post(...) and the problem was gone! The take away from this lesson is - when processing large amount of data (I assume it to be the major reason you wanted to use server side processing in the first place), use POST instead of GET.

Thanks for the help!
lip1

Cell cannot be updated (Server error) ? mvc4 jquery datatables

$
0
0
Hi

As title stated i am facing the issue . Is there anywork around to know how to resolve and find the cause of issue .

Thing is when i use fnRender i am getting this error when i remove this the DATATABLE working cool .

My code :

<script type="text/javascript">

$(document).ready(function () {

$.datepicker.regional[""].dateFormat = 'dd/mm/yy';
$.datepicker.setDefaults($.datepicker.regional['']);

var tab= $('#myDataTable').dataTable({

"bProcessing": true,
"bServerSide": true,
"sAjaxSource": 'AjaxDataProvider',
"bJQueryUI": true,
"aoColumns": [
{
"sName": "ID",
"bSearchable": false,
"bSortable": false
,
"fnRender": function (oObj) {
return '<a href=\"Home/Details/' + oObj.aData[0] + '\">View</a>';
}
},
{ "sName": "COMPANY_NAME" },
{ "sName": "ADDRESS" },
{ "sName": "TOWN" }
]

});

tab.columnFilter({
sPlaceHolder: "head:after",
aoColumns: [
{
type: "date-range",
bRegex: true,
bSmart: true
},
{
type: "number-range"
},
{ type: "text" },

{ type: "text" }

]
});

tab.makeEditable({
"aoColumns": [
null,
null,
null,
{
indicator: 'Saving...',
tooltip: 'Click to select town',
loadtext: 'loading...',
type: 'select',
onblur: 'submit',
data: "{'London':'London','Liverpool':'Liverpool','Portsmouth':'Portsmouth','Edinburgh':'Edinburgh', 'Blackburn':'Blackburn','Kent':'Kent','Essex':'Essex','Oxon':'Oxon','Lothian':'Lothian','West Sussex':'West Sussex','Lanarkshire':'Lanarkshire','Birmingham':'Birmingham','East Sussex':'East Sussex','Surrey':'Surrey'}"
}]
});

});

</script>

Regards

Colvis - no overlay on show, so I can't hide it when I'm done selecting my columns

$
0
0
When I click on Show/Hide Column, the list of columns doesn't show up properly and I can't hide the list either. This is what it looks like:

http://i.imgur.com/0HyhTUQ.png

scope.options = {
"bJQueryUI": true,
"bPaginate": true,
"bLengthChange": true,
"iDisplayLength": 25,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": true,
"bStateSave": true,
"sScrollY": 385,
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"bProcessing": true,
"bDeferRender": true,
"oLanguage": {"sSearch": "Find User: "},
"sDom": '<"H"lfrCTMDR>t<"F"ipS>',
"sPaginationType": "full_numbers",
"oTableTools": {
"sSwfPath": "spDash/app/lib/dataTables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons":[{
"sExtends": "xls",
"sFileName": reportName + ".xls",
"bFooter": false
},{
"sExtends": "pdf",
"sFileName": reportName + ".xls",
"sPdfOrientation": "landscape",
"sPdfMessage": "Your custom message would go here."
},'print']
}
};


var timer = $timeout(function (){
console.log('calling dataTables');
var dataTable = element.dataTable(scope.options);
new $.fn.dataTable.FixedColumns( dataTable ); //fixed column doesn't work as well
},2000);

Exlipic save and load state

$
0
0
Hi, any suggestions on the best way to add save/load button to data table? Instead of saveing state user would need to click and provide additional info like name.
Currently... save state is called almost on any action.

Dec to HEX conversion

$
0
0
HI All

I am using a MySQLi data connection example ( http://datatables.net/development/server-side/php_mysqli ) to retrieve the required data, this is working great but the information in the Database is stored in a decimal format. I need to display this as a Hex value.

I there a method to do this? I have search and date's can be reformatted and numbers formatted to show thousands etc, but nothing for hex.

Any pointers would be appreciated.

Regards

Wayne

Rowspan in <tbody>: Cannot read property 'className' of undefined

$
0
0
I'm using JQuery and DataTable plugin with my tables. So, I need use rowspan in the body of my tables, but a error message is displayed in the console of the chrome: Uncaught TypeError: Cannot read property 'className' of undefined

I read about the fakeRowspan plugin, but I don't know how use it.

See my fiddle with the problem:
http://jsfiddle.net/mayconfsbrito/9mkHz/8/
Viewing all 1815 articles
Browse latest View live