how does aocolumns match to data?
how does aocolumns match to data?
My datatable only display data for first column and rest of 7 columns are blank.
the only reason datatable display data for first column is because "mData" so don't refer me to reference.
I already went to reference.
http://debug.datatables.net/ajesoh
show that datatable got all data but does not display rest of data almost if it could not find rest of data.
I notice aocolumns is array of objects [{"mData":"name"},{"mData":"email"}] while my data is
[{"name":"john","email":"john@email.com"}]
should I rewrite aocolumns to match my data structure?
This question has an accepted answers - jump to answer
Answers
Thanks for the debug trace. It shows:
mData
didn't exist in 1.9.0. It was calledmDataProp
.You could upgrade to 1.9.4, but really I would suggest updating to the latest release - 1.10.3.
Allan
You are right. change mData to mDataProp allow datatable to display rest of data. I need to discuss with my coworker on upgrade to 1.10.
Thank you very much.