DataTable not initilializing
DataTable not initilializing
Link to test case: https://jsfiddle.net/BeerusDev/5nLg4bt0/25/
Hello, I am starting a new project and plan on using DataTables again. I initialized the table and I get the following errors:
"jQuery.Deferred exception: Cannot read property 'sWidth' of undefined", "TypeError: Cannot read property 'sWidth' of undefined
"Script error."
I created a sample dataSet to populate the table with and I have never seen this error before out of all the times I have used DataTables.
I also get warnings in my column initialization . "Duplicate key: data"
Why is this?
I have the same amount of columns in my data/column init. as my HTML table.
This question has an accepted answers - jump to answer
Answers
The main problem is you have
columns
defined with one object not individual objects for each column. See this example. Fixing this might fix theCannot read property 'sWidth' of undefined
error.Nope... you are defining only one column in
columns
Kevin
I am such an idiot haha, thank you Kevin! I forgot to wrap the columns respectfully with brackets..
@kthorngren one more thing, why won't bootstrap load? I tried concatenating the CDN files and that screwed everything up so I have them all individual and it still isn't recognizing bootstrap??
https://jsfiddle.net/BeerusDev/5nLg4bt0/39/