Make variable column numbers work
Make variable column numbers work
tristanvanbokkem
Posts: 19Questions: 0Answers: 0
Hi Allan,
I have been trying to implement DT the last couple of days. All seems to work at this point quite nicely except I have no idea on how to make DT work with variale column numbers. I have dug into the forums already but couldn't find a clear answer.
I know my JSON will return 19 keys in the array so I have to set the HTML to have 19 tags. But what if my JSON will return 20 keys? At this point it will brake my DT.
I have been trying to implement DT the last couple of days. All seems to work at this point quite nicely except I have no idea on how to make DT work with variale column numbers. I have dug into the forums already but couldn't find a clear answer.
I know my JSON will return 19 keys in the array so I have to set the HTML to have 19 tags. But what if my JSON will return 20 keys? At this point it will brake my DT.
This discussion has been closed.
Replies
Alternatively, use DataTables to create the columns (unless you are using Ajax sourced data, in which case you need to make the Ajax call yourself) using sTitle to set the column title.
Allan