2016-09-26 53 views

回答

1

發現這個答案在這裏:https://datatables.net/forums/discussion/32575/uncaught-typeerror-cannot-set-property-dt-cellindex-of-undefined

A simple mistake, the table header had a column " with no title, but the column did not exist in the table itself. I could not see it missing (because o no title and no borders).

有用嗎?

+0

謝謝你的快速回復......讓我看看 –

+0

它似乎沒有解決.....你知道我該如何檢查我的表格thead標記td是否與我的表格匹配tbody td? –

+0

你可以在這裏發送你的代碼https://jsbin.com,這樣我可以幫助你更好嗎? – a7madgamal

3

我們有基於列的從0

在我們的餐桌開始數在DataTable中初始化了同樣的錯誤,有什麼固定的,我們正在改變(目標),我們有4列,以便taget:3 ]

$.extend($.fn.dataTable.defaults, { 
     columnDefs: [{ 
      targets: [ 3 ] 
     }] 
}); 
6

基本上這個問題出來了,因爲錯過了匹配計數th到td。請確保第t次比賽的數量。希望這會幫助你。

+1

這基本上適合我。添加的列數應與初始化的數字相同。 – Paolo

相關問題