No data displayed

No data displayed

rusiebrusieb Posts: 2Questions: 0Answers: 0
edited April 2014 in General
I've used DataTables quite a bit in the past, but this one has me stumped. I think it's my data format. I'm pulling in data from two different sites, running calculations and re-writing into an object. The table is initializing properly and with the headers as defined by aoColumns, sTitle, but there is no data showing up in the table, i just get one blank line.
Here's a link to a fiddle (first one I've ever done and it's doing absolutely nothing):
http://jsfiddle.net/rusieb/v9Dge/
Here's my data as it's formatted currently:
{
"aaData": [
{
"ID": "1",
"Title": "Test title",
"Priority": "0",
"Criticality": "0",
"Technical": "0",
"Programmatic": "0",
"Total": "0",
"Quantity": "0"
},
{
"ID": "2",
"Title": "Test title",
"Priority": "0",
"Criticality": "0",
"Technical": "0",
"Programmatic": "0",
"Total": "0",
"Quantity": "0"
},
{
"ID": "3",
"Title": "Test image attachment",
"Priority": "0",
"Criticality": "0",
"Technical": "0",
"Programmatic": "0",
"Total": "0",
"Quantity": "0"
},
{
"ID": "4",
"Title": "Test ppt attachment",
"Priority": "6",
"Criticality": "10",
"Technical": "45",
"Programmatic": "0",
"Total": "55",
"Quantity": "1"
},
{
"ID": "5",
"Title": "test large ppt",
"Priority": "9",
"Criticality": "15",
"Technical": "35",
"Programmatic": "0",
"Total": "50",
"Quantity": "1"
},
{
"ID": "6",
"Title": "test pdf",
"Priority": "1",
"Criticality": "15",
"Technical": "45",
"Programmatic": "0",
"Total": "60",
"Quantity": "1"
},
{
"ID": "7",
"Title": "TEST OF SUBMISSION FROM BASE",
"Priority": "0",
"Criticality": "0",
"Technical": "0",
"Programmatic": "0",
"Total": "0",
"Quantity": "0"
}
]
}

And my table initialization code:
var oTable = $('#SummaryTable').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [
"csv",
"xls",
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Check check "
}
]
}
],
"sSwfPath": "../Scripts/DataTables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
},
"aaData" : SubmissionsData,
"aoColumns": [
{"sTitle": "ID", "mData": "ID"},
{"sTitle": "Title", "mData": "Title" },
{"sTitle": "Priority", "mData": "Priority" },
{"sTitle": "Criticality Score", "mData": "Criticality" },
{"sTitle": "Technical Risk", "mData": "Technical" },
{"sTitle": "Programmatic Risk", "mData": "Programmatic" },
{"sTitle": "Total Score", "mData": "Total" },
{"sTitle": "# Evals", "mData": "Quantity"}
],
"aLengthMenu": [
[10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]
],
"iDisplayLength" : 10

}); //close otable datatable



Sorry i can't post a link to my live page, it's on a secure server. Thanks in advance for any help!

Replies

  • rusiebrusieb Posts: 2Questions: 0Answers: 0
    edited April 2014
    Finally figured it out. It was my data. Should have left the addition of aaData to datatables rather than plugging it in myself!
This discussion has been closed.