Any limited criteria for column

Any limited criteria for column

karnesh141karnesh141 Posts: 4Questions: 0Answers: 0
edited October 2013 in DataTables 1.9
I have gone through my code. when create Datatable with 7 column, it's not showing any error. if i show data in 8 column then it show error.

Error is : DataTables warning (table id = 'example'): Requested unknown parameter '0' from the data source for

[code]
function onSuccess(result) {
var prod = eval("(" + result + ")");
if (prod.length > 0) {
var regList = new Array(7);
for (var i = 0; i < prod.length; i++) {
regList[i] = new Array(7);
regList[i][0] = prod[i].Name;
regList[i][1] = prod[i].ContactNumber;
regList[i][2] = prod[i].RegistrationNumber;
regList[i][3] = prod[i].BankName;
regList[i][4] = prod[i].BankReferenceNumber.replace("Reference No (In case of netbanking)", "");
regList[i][5] = prod[i].AmountDepositied;
regList[i][6] = prod[i].DepositeDate;
regList[i][7] = prod[i].PaymentMode;
/*regList[i][8] = prod[i].Attachment;*/

}
$('#dynamic').html('');
$('#example').dataTable({
"aaData": regList,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "sTitle": "Name", "bSortable": false },
{ "sTitle": "Contact Number", "bSortable": false },
{ "sTitle": "Registration", "bSortable": false },
{ "sTitle": "Bank Name", "bSortable": false },
{ "sTitle": "Bank Ref No", "bSortable": false },
{ "sTitle": "Amount", "bSortable": false },
{ "sTitle": "Date", "bSortable": false },
{ "sTitle": "Payment Mode", "bSortable": false },
/*{ "sTitle": "Receipt", "bSortable": false },*/
]
});
}
$("#loading").css('display', 'none');
}
[/code]

Replies

  • allanallan Posts: 63,381Questions: 1Answers: 10,449 Site admin
    Link to a test case showing the problem as noted in the forum rules please.

    Allan
  • karnesh141karnesh141 Posts: 4Questions: 0Answers: 0
    edited October 2013
    Hi allan

    Before loading data show error message. and showing empty row also.

    Link is here.
    http://dreamjeenew.mysociety.co.in/testingpurpose.aspx

    please give response as soon as possible with solution.
This discussion has been closed.