Server side sent extra parameter
Server side sent extra parameter
var t = $('#userTable').DataTable( {
"processing": true,
"serverSide": true,
"ajax": "${pageContext.request.contextPath}/ajaxTestTable",
"data": function ( d ) {
d.myKey = "myValue";
},
"columns": [
{ "data": "totalUser" },
{ "data": "fullname" },
{ "data": "username" },
{ "data": "ministryid" },
{ "data": "gradeid" },
{ "data": "officeemail" }
],
"columnDefs": [ {
"searchable": false,
"orderable": false,
"targets": 0
} ],
"order": [[ 1, 'asc' ]]
} );
I try to send extra parameter. It doesnt work, when i try open console on browser it will said "TypeError: data is undefined if ( data.DT_RowId ) {".
What did i do wrong?
This question has an accepted answers - jump to answer
Answers
I already resolve this. data is a object not a function. Sorry guys