aoColumnDefs error please HELP!

aoColumnDefs error please HELP!

runelrunel Posts: 4Questions: 0Answers: 0
edited August 2012 in General
Please help I've been trying to resolve this problem all day...
//code is good
[code]
"aoColumnDefs":
[{
"bSortable": false,
"aTargets": [ 0, 2 ]
}]
[/code]

That code is fine.. I have a five columns.. Here's the problem, when I want to make the column #3 to bSortable false it gives me an error
//It gives me an error.. 'Uncaught TypeError: Cannot read property 'className' of undefined'
[code]
"aoColumnDefs":
[{
"bSortable": false,
"aTargets": [ 0, 2,3 ]
}]
[/code]

So I tried using aoColumns
//Still giving me an error.. 'Uncaught TypeError: Cannot read property 'className' of undefined'
[code]
"aoColumns": [
{ "bSortable": false },
null,
null,
null,
null
]
[/code]
And here's the crazy part
//Still giving me a freaking error.. 'Uncaught TypeError: Cannot read property 'className' of undefined'
[code]
"aoColumns": [
null,
null,
null,
null,
null
]
[/code]

Please help me.. I beg all of you!. PLEASE!

Replies

  • runelrunel Posts: 4Questions: 0Answers: 0
    Ohhhh... I figured out the error.. It was a silly mistake... Thanks for DataTables debugger it points out that I have an unknown parameter in my table id #6.. my error is in my last datatable It needs to have 5 columns but I only have 3.. which is why aoColumns or aoColumnDefs is acting wierd.. So after I changed the columns from 3 to 5 .. I didn't receive the error anymore .. all is well..
This discussion has been closed.