How to use DataTables 1.10.12?
How to use DataTables 1.10.12?
ahmednegm
Posts: 1Questions: 1Answers: 0
Hi,
I was using an old version of DataTables and now I need to get the benefits of the latest version. I was using the following and I need to know/convert the parameters to the new version as I see that some params are not supported:
$('#List').dataTable({
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
],
"aLengthMenu": [
[10, 25, 50, 100, 1000000],
[10, 25, 50, 100, "All"] // change per page values here
],
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": 'DataProcessor.asmx/LoadMessages',
"fnServerData": function (sSource, aoData, fnCallback) {
aoData.push({ "name": "Country", "value": $('#Country_lst').val() });
$.ajax({
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"type": "GET",
"url": sSource,
"data": aoData,
"success": function (msg) {
var json = jQuery.parseJSON(msg.d);
fnCallback(json);
},
error: function (xhr, textStatus, error) {
if (typeof console == "object") {
console.log(xhr.status + "," + xhr.responseText + "," + textStatus + "," + error);
}
}
});
},
// set the initial value
"iDisplayLength": 10,
"sPaginationType": "bootstrap_full_number",
"oLanguage": {
"sUrl": "http://cdn.datatables.net/plug-ins/505bef35b56/i18n/Arabic.json"
}
});
This discussion has been closed.
Answers
The 1.10 upgrade notes are where to start. They also include a table which converts from 1.9- naming to 1.10+.
Allan