Error after clearing datatable using fnClearTable()
Error after clearing datatable using fnClearTable()
codemonkey65
Posts: 14Questions: 3Answers: 0
The first time I retrieve data into my datatable, everything works according to my expectations. After I clear the page (including several html controls) and reset to my defaults, I attempt a second display of data and receive the following error: 'Unable to get value of the property 'toLowerCase': object is null or undefined'
My code to fill the grid uses the following code:
$('#divLoadingData').html('');
$('#grdLoadingData').dataTable({
"bLengthChange": false,
"bPaginate": true,
//"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aaData": records,
"sDom": "T<'clear'>lfrtip",
"oTableTools": {
"sRowSelect": "multi"
},
"bAutoWidth": false,
"aoColumns": [
{ "sTitle": "MC #", "sWidth": "40px" },
{ "sTitle": "Order #", "sWidth": "40px" },
{ "sTitle": "Site", "sWidth": "25px" },
{ "sTitle": "Seq. #", "sWidth": "15px" }...
{ "sTitle": "DepartureDate", "sWidth": "0px" },
{ "sTitle": "GroupingValue", "sWidth": "0px" }
]
}).rowGrouping({
bExpandableGrouping: true,
iGroupingColumnIndex: 52
}); ;
hideColumns(view.val());
}
On click of my 'CLEAR' button the following code is executed:
var loadingDataTable = $('#grdLoadingData').dataTable();
loadingDataTable.fnClearTable();
After I clear the page, I try to generate a new grid and receive the error mentioned above.
Can anyone help, please?
My code to fill the grid uses the following code:
$('#divLoadingData').html('');
$('#grdLoadingData').dataTable({
"bLengthChange": false,
"bPaginate": true,
//"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aaData": records,
"sDom": "T<'clear'>lfrtip",
"oTableTools": {
"sRowSelect": "multi"
},
"bAutoWidth": false,
"aoColumns": [
{ "sTitle": "MC #", "sWidth": "40px" },
{ "sTitle": "Order #", "sWidth": "40px" },
{ "sTitle": "Site", "sWidth": "25px" },
{ "sTitle": "Seq. #", "sWidth": "15px" }...
{ "sTitle": "DepartureDate", "sWidth": "0px" },
{ "sTitle": "GroupingValue", "sWidth": "0px" }
]
}).rowGrouping({
bExpandableGrouping: true,
iGroupingColumnIndex: 52
}); ;
hideColumns(view.val());
}
On click of my 'CLEAR' button the following code is executed:
var loadingDataTable = $('#grdLoadingData').dataTable();
loadingDataTable.fnClearTable();
After I clear the page, I try to generate a new grid and receive the error mentioned above.
Can anyone help, please?
This discussion has been closed.
Replies
Makes live easier :)