Hi,
How to multiple record bind asp.net Gridview using Json.Parse in jquery
or
JSON.Parse data convert to JSON.Stringify
Script:
function DailyWorkdisplayTable(data) {
$('#<%= GVDailyWorkEntry.ClientID %>').prepend($("").append($('#<%= GVDailyWorkEntry.ClientID %>').find("tr:first"))).DataTable({
"bDestroy": true,
"responsive": true,
"destroy": true,
"sPaginationType": "full_numbers",
'bJQueryUI': true,
'bAutoWidth': true,
"stateSave" : true,
data: JSON.parse(data),
"columns": [
//{ "data": "Id", "visible": true }, //"visible": false, "targets": [0]
{ "data": "DWRID" },
{ "data": "Category" },
{ "data": "Description" },
{ "data": "Status" },
{ "data": "Category_Id" },
{ "data": "GivenBy" },
{ "data": "DeadLine_Date" },
{ "data": "Completed_Date", "visible": true },
{ "data": "Entered_Date", "visible": false, sClass: "hidden" },
{ "data": "DW_Type", "visible": true, sClass: "hidden" },
{ "data": "User_Id", "visible": true, sClass: "hidden" },
{ "data": "DWID", "visible": true,
//"render": function (data, type, full, meta) {
// return ""
//}
//"targets": 1,
"data": null,
"defaultContent": "
"
}
]
});
$(".btndwEdit").bind("click", Edit);
}

Ashwin ChauhanPosted Apr 12, 2019, 2:31 AM