HTML and null in the dataset triggers error?
HTML and null in the dataset triggers error?
luketheobscure
Posts: 20Questions: 0Answers: 0
I've got some JSON with both html and null values. Here's an example from the problem section:
[code] ...[17012,"Stuff",1281481,"Warning<\/span>"],
[11519,"Other Stuff",3128576,null]... [/code]
Apparently DataTables doesn't like this and throws an error- "sData is null" in the uncompressed build. The same JSON data with empty string ("") instead of null works fine, or null values without html works fine too.
[code] ...[17012,"Stuff",1281481,"Warning<\/span>"],
[11519,"Other Stuff",3128576,null]... [/code]
Apparently DataTables doesn't like this and throws an error- "sData is null" in the uncompressed build. The same JSON data with empty string ("") instead of null works fine, or null values without html works fine too.
This discussion has been closed.
Replies
In the meantime try setting http://www.datatables.net/ref#sDefaultContent for that column (or use empty strings).
http://www.datatables.net/forums/discussion/6115/fnupdate-when-there-are-action-columns/p1