I have a datatable which uses a server side datasource like this:
$('.taskTable').dataTable({
"bServerSide": true,
"bProcessing": false,
"fnServerData": function (sSource, aoData, fnCallback) {
...
aoData.push({ "name": "groupIDs", "value": $("#groupIDs").val() });
...
$.ajax({
'dataType': 'json',
'type': 'post',
'url': "@Url.Action(MVC.Tasks.Tasks.DataTable())",
'data': aoData
});
}
});
Problem is, $("#groupIDs").val() doesn't format the values so they bind with my model (.NET MVC3). .NET wants to see something like groupIDs[0]=23&groupIDs[1]=42&... but instead it is sending it as groupIDs=[23,42,...]. How can I get datatables to send it in the right format?