how to display array of an object in a dataTable.

how to display array of an object in a dataTable.

newtoGridnewtoGrid Posts: 2Questions: 1Answers: 0

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

This discussion has been closed.