Datatable check type of column like html , string , date
Datatable check type of column like html , string , date
Harsh Damania
Posts: 8Questions: 4Answers: 0
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You shouldn't ever need to set the
columns.type
option yourself - certainly not for the options that DataTables provides internally. If it isn't auto-detected as the correct type, then the sorting won't support that type (due to some data in the column not matching that type).There currently isn't an external API to get the column type. What do you need that information for?
Allan
Hey Allan,
Thank you very much for your reply but i used this and it works
column.context[0].aoColumns[column.selector.cols].sType == "html"
I need to perform some javascript operation when column type is html and then pass it to search by creating regex.
It might work for now, but you shouldn't need to get/set internal properties. That might break in future versions!
Allan
Oki...Thanks