Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 83167

how can I pass multiple parameter to the function

$
0
0

Hi
I have given my code given below. I want to pass ID,EmployeeName,ClockedDatetoListas argument to the function from the clicked event of button . ShowDeleteModalPopup. Please can you help me with suggested code

var table= $('#tblData').DataTable({
"ajax": {
"url": "/Home/GetClockList?employeeid=" + $('#dropdownEmployee').val()
+ "&clockdate=" + $('#txtAttendanceDate').val() ,
"type": "GET",
"datatype": "json",
"dataSrc": function (json) {
return JSON.parse(json);
}
},
"columns": [
{ "data": 'ID', "width": "6%" },
{ "data": 'EmployeeName', "width": "20%" },
{ "data": 'ClockedDatetoList', "width": "20%" },
{
"data": "ID",
"render": function (data) {
return <div class="text-center"> <a class='btn btn-danger text-white' style='cursor:pointer; width:100px;' onclick="ShowDeleteModalPopup(${data})" > <i class='far fa-trash-alt'></i> Delete </a></div> ;
}, "width": "5%"
}

            ],

function ShowDeleteModalPopup()
alert(id);
$('#lblID').val(id);
$('#deleteConfirmationModal').modal('show');
}


Viewing all articles
Browse latest Browse all 83167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>