how to display array of an object in a dataTable.
how to display array of an object in a dataTable.
I am new to dataTable grid.
I am trying to display arrayof obejct in a table . just want to know what wrong m doing.
This is my server data
[{"TierId":1,"TierName":"Support Tier1","TierDescription":" used to resolve ticket","active":"Y","createdBy":null,"lastModifiedBy":null,"sla":0}, {"TierId":2,"TierName":"Support Tier2","TierDescription":" used to resolve the tech Tickets","active":"Y","createdBy":null,"lastModifiedBy":null,"sla":0}
$('#example').dataTable({
"bProcessing": true,
"bDestroy": true,
"bServerSide": false,
"sort": "position",
"sAjaxSource":<%=request.getAttribute("getSupportTiers")%>,
"aoColumns" : [ {
"mDataProp" : "supportTierId"
}, {
"mDataProp" : "supportTierName"
}, {
"mDataProp" : "supportTierDescription"
}, {
"mDataProp" : "active"
}, {
"mDataProp" : "createdBy"
},
{
"mDataProp" : "lastModifiedBy"
},
{
"mDataProp" : "sla"
}
]
});
Answers
Figured out the problem. got it resolved.
Thanks All.