Transform show value in depend of field type
Transform show value in depend of field type
ashl1
Posts: 18Questions: 5Answers: 1
in DataTables
Does DT supports field type or field type plugins to transform showed value got from AJAX. For example - date conversion, depend on the locale, etc. How could I do it simple?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
https://datatables.net/reference/option/columns.render
Thank you for the quick response.
As I understand there is no way to create plugin for specified type. As I understand the simplest way for that is to define the transform function and explicitly set it for the columns.
That is correct. The column type information is not currently passed into the rendering function - although that is a good candidate for a future option in the
meta
parameter of thecolumns.render
option. I will look into adding that - thanks for the suggestion.Allan