Nirmal KumarC

Nirmal KumarC

  • 1.4k
  • 327
  • 79.1k

How to multiple record bind Gridview using Json.Parse

Apr 12 2019 12:44 AM
Hi,
 
 How to multiple record bind asp.net Gridview using Json.Parse in jquery 
   or
JSON.Parse data convert to JSON.Stringify   
 
Script:
 
<script type="text/jscript">
function DailyWorkdisplayTable(data) {
$('#<%= GVDailyWorkEntry.ClientID %>').prepend($("<thead></thead>").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 "<input type='button' id='btnShowPopup' value='Edit'>"
//}
//"targets": 1,
"data": null,
"defaultContent": "<img src='http://localhost:10947/Employee/Design/Image/Edit.png' height='20' width='20' class='btndwEdit'/>"
}
]
});
$(".btndwEdit").bind("click", Edit);
}
</script>
 
 

Answers (1)