Column in table as an object property- returns alert if not init
Column in table as an object property- returns alert if not init
RuthlezzKick
Posts: 3Questions: 2Answers: 0
Hi,
here is my setupTable.
var setupTable = function () {
return $("#myTable").dataTable({
sAjaxSource: config.urls.ajaxSource,
sSelectionMode: 'multipleCheckOnly',
sDom: '<"$grid-toolbar"s>tr<"dataTables-footer"ilp>',
aoColumns: [
{
mData: "DeliveryAddress",
sWidth: "300px"
},
{
mData: "Title",
sWidth: "180px"
},
{
mData: "Quantity",
sWidth: "60px"
},
{
mData: "DeliveryAddressDetails.CityName",
bVisible: false,
bSearchable: false
},
{
mData: "DeliveryAddressDetails.ZipCode",
bVisible: false,
bSearchable: false,
}
]
});
};
ajax returns data with some object as a one of property (DeliveryAddressDetails)
but if my json result has a row with not set DeliveryAddressDetails
I get javascript alert
DataTables warring - requested unknown parameter
How to stop it ? in this case i would like to have just null or nothing in DeliveryAddressDetails.ZipCode and DeliveryAddressDetails.CityName column
This discussion has been closed.