Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.8k

Id value undefined

Jun 1 2021 8:58 AM
Hi
 
  When i check Id value in ConfirmDelete it shows - undefined.
 
{
"data": "Id", "render": function (data) {
return "<a class='btn btn-primary btn-sm' id='btnEdit' data-id='Id'><i class='fa fa-pencil'></i> Edit</a> <a class='btn btn-danger btn-sm' style='margin-left:5px' onclick=ConfirmDelete(" + data.Id + ")><i class='fa fa-trash'></i> Delete</a>";
},
},
 
function ConfirmDelete(Id)
{
alert(Id);
$("#hiddenId").val(Id);
$("#DeleteModal").modal('show');
}
 
Thanks 
 
 

Answers (5)