Setting additional data attribues. Accessing the datatable object from ajax:data:function()
Setting additional data attribues. Accessing the datatable object from ajax:data:function()

1) Is there a way to access the columns:
attributes at the ajax call? Would make it simpler sending custom attributes.
2) Also inside the ajax: "data": function()
how is usertable
object accessible? Is there a jquery() method I can use?
usertable=$('#users').DataTable( {
columns: [
{data: 'DT_RowId', "orderable": false, "searchable": false},
{data: 'Last Name', customdata:'some data'},
{data: 'Age', customdata:'some data'}
],
"order": [[8, "desc" ]],
"ajax": {
"url": "cgi-bin/getdata.php",
"dataType": "json",
"data": function ( data ) {
*** get customdata attribute from column:data attribute ??? ****
return data;
},
}
})
This discussion has been closed.