Using Modal Dialog with Datatables

Using Modal Dialog with Datatables

dwacekdwacek Posts: 3Questions: 3Answers: 0

Hi Everyone

Im wanting to show a modal dialog on a action button or on the rows click event. When a user clicks a custom button or the row I want to display more details on the record and ask the user to take action on it. I get a object doesnt exist in my javascript can someone please tell me what Im doing wrong in why my code in the row click doesnt work

Thanks
Dennis

Javascript

$(document).ready(function () {
$.ajax({
type: "POST",
url: "ITEquipment.asmx/GetRequests",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
$('#Requests').dataTable({
"aaData": data.d,
"bProcessing": true,
"bDestroy": true,
"aoColumns": [
{ "mData": "rname" },
{ "mData": "requip" },
{ "mData": "rfrom" },
{ "mData": "rto" },
{
data: null,
className: "center",
defaultContent: '<a href="rModalApprove" class="editor_edit" role="button">Approve/Decline</a>'
},
],

        });

        $("#Requests tbody").on('click', 'tr:not(:has(td.dataTables_empty))', function (e) {
            $('#basicModal').modal('show');


        });

    }
});

});

This discussion has been closed.