2015-05-20 49 views
0

我使用的是最新版本的Jquery DataTables.net,並有顯示共有10條記錄每頁一表,與1004jQuery的數據表不顯示頁碼正確

一個最大計數然而,信息欄,這樣寫道:

顯示1到5的1.004

enter image description here

我T的默認能夠如下:

var oMessageDate = $("#messageDateDT").DataTable({ 
dom: "<'row'<'col-sm-12'<'pull-right'T><'pull-left'l>r<'clearfix'>>>t<'row'<'col-sm-12'<'pull-left'i><'pull-right'p><'clearfix'>>>", 
stateSave: true, 
pageLength: 10, 
lengthMenu: [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]], 
columns: [ 
    { data: "MessageReference", sWidth: "15%" }, 
    { data: "Beneficiary" }, 
    { data: "Currency", sWidth: "5%" }, 
    { data: "Amount" }, 
    { data: "MessageDate", sWidth: "15%" }, 
    { data: "MessageType", sWidth: "5%" }, 
    { data: "Direction", sWidth: "5%"}, 
    { data: "Assigned", sWidth: "10%" }, 
    { data: "Status", sWidth: "17%" }, 
    { data: "Message" }, 
    { data: "MessageId", sWidth: "5%" }, 
    { data: "StatusCode" } 
], 
"autoWidth": false, 
"pagingType" :"full_numbers", 
language: { 
    "decimal": "-", 
    "thousands": ".", 
    "infoEmpty": "No entries to show", 
    "lengthMenu": "Display _MENU_ records", 
    "processing": "Loading data", 
    searchPlaceholder: "on everything", 
    "zeroRecords": "No records to display", 
    "aria": { 
     "sortAscending": ": activate to sort column ascending", 
     "sortDescending": ": activate to sort column descending" 
    } 
}, 
"columnDefs": [ 
    { "visible": false, "targets": 9 }, 

    { "visible": false, "targets": 10 }, 
    { "visible": false, "targets": 11 } 
] 

});

您能否請指教,我該如何糾正這一點。

回答

1

你的屏幕截圖顯示

顯示1至1.004項

的以及默認pageLength選項是10,它會給你101頁。

+0

真的,我多麼愚蠢。但是,我如何修正顯示的1.004小數。 – CSharpNewBee

+1

這是一個千位分隔符,您可以在'language'選項中進行更改。 – Raidri

+0

是的,我可以,但這會影響表格中的項目。我只是想要這個'顯示'數字顯示1004 – CSharpNewBee