I want to populate json to grid "No data available in table"
I want to populate json to grid "No data available in table"
Json:
{"programs":{"program":[{"id":"1","name":"Banking English Programs"},{"id":"2","name":"Bank Science & Operations Programs","desc":"-"},{"id":"3","name":"Credit Management, Corporate & Project Finance","desc":"-"},{"id":"4","name":"Treasury & Capital Market Programs","desc":"-"}]}}
Html:
id | name | desc |
---|---|---|
id | name | desc |
Javascript:
$(document).ready(function() {
var table = $('#programs').DataTable( {
"processing": true,
"ajax": {
"url": "abc.asmx",
"dataSrc": ""
},
"columns": [
{ "data": "programs.program.id" },
{ "data": "programs.program.name" },
{ "data": "programs.program.desc" }
]
} );
} );
Additionality, I want to have a button with every row.
Please help and let me know what I am doing wrong.