getiing col.mData is undefined
getiing col.mData is undefined
I was trying to bind the data to table on button(client side) click. I am getting respose object from the service. But data is not getting loaded in table. My code base is given below.
on Button click
function GetPBCItems() {
if ($.fn.dataTable.isDataTable('#tblPBCListDetails')) {
table = $('#tblPBCListDetails').DataTable();
table.destroy();
}
var _dashboardServiceUrl = _spPageContextInfo.siteAbsoluteUrl + "/_vti_bin/KPMG.GO.KCentral.GOAudit/DashboardService/DashboardService.svc/";
var paramss = GetCheckBoxListValues();
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
url: _dashboardServiceUrl + "GetPBCLists",
data: { listName: paramss },
dataType: "json",
success: function (response) {
handleGetListItems(response);
},
error: function (message) {
showErrorMessageForPBCListItems(message.statusText);
}
});
function handleGetListItems(response)
{
$('#tblPBCListDetails').dataTable({
columns: [{ 'data': 'PBCListNames' }, { 'data': 'Title' }, { 'data': 'Modified' }],
bServerSide: true,
sAJAXSource: response,
sServerMethod: "GET"
});
}
getting respose object in handleGetListItems() method.
Answers
Per the forum rules, please link to a test case showing the issue.
Allan