Showing ... of undefined entries ?
Showing ... of undefined entries ?
javahollic
Posts: 11Questions: 0Answers: 0
I'm loading JSON data dynamically into a DataTable but it's always saying 'undefined' in the text at the bottom of the table. What do I have to do so set the 'value' of the 'type' of data?
This discussion has been closed.
Replies
Allan
The Json data I'm downloading matches that format, eg:
[code]
{"aaData":[["Domain Routing Test Project","","","Major",""],["General","","","Minor",""]]}
[/code]
This isn't about the content of the download, its more about the DataTable summary information, eg:
[code]
Showing 3 of 30 entries
[/code]
But Ive always got:
[code]
Showing 3 of 30 undefined entries
[/code]
I'm trying to figure out what I need to to switch the 'undefined' bit to something else?
Allan
[code]
oTable = $('#dmqExceptions').dataTable( {
"bServerSide": true,
"bProcessing": true,
"sPaginationType": "full_numbers",
"bSort": true,
"bInfo": true,
"bJQueryUI": true,
"sAjaxSource": readAllUrl,
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
/*
if ( aData[0] == "(any)" )
{
$('td:eq(4)', nRow).html( '(any)' );
}
if ( aData[3] == "(any)" )
{
$('td:eq(3)', nRow).html( '(any)' );
}
if ( aData[4] == "(any)" )
{
$('td:eq(4)', nRow).html( '(any)' );
}
*/
return nRow;
},
"aoColumns": [
{ "sClass": "col_project_editable" },
{ "sClass": "col_text_editable" },
{ "sClass": "col_text_editable" },
{ "sClass": "col_priority_editable" },
{ "sClass": "col_itype_editable" }
]
} );
[/code]
Im working on finding a home for the screenshot...
http://www.datatables.net/usage/server-side
Allan