deferLoading and Initial Data
deferLoading and Initial Data
fkmbkk
Posts: 31Questions: 5Answers: 0
The default initial data for deferLoading is the preloaded HTML.
Can I load the initial data from my Javascript ? like json ?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
yes
But I get this error : Requested unknown parameter 'Id' for row 0....
Did I miss something ?
The reason I want to load my initial data using js is because I do not want to use any server side code.
You're using the JS Array sourced data (which is what I linked you to), but since you're using an object instead of an array, you need to use an object as the source.
The
columns.data
setting will tell DT what index to use for that column within the object its pulled for that row, so if you change yourdataSet
variable to this, it will work..