How to concat two or more columns of same datatabase table to show in a single datatable column
How to concat two or more columns of same datatabase table to show in a single datatable column
This question has accepted answers - jump to:
This discussion has been closed.
Answers
You can use data from any cell in the same row. You can also use HTML code to format each field.
This is correct - use the
columns.render
option to render data to suit your own needs.See also the renderers manual page.
Allan
Thanks for the help. But I achieved it in a similar manner.
I will show how I solved my case thinking it might help others.
All I wanted was to Concat Different Cols from Database Table to show in Datatable but with single column name hence I used it like this:
In this case I wanted the values of different columns to be seperated with comma .And I am making use of 'full' argument to get values of all fields fetched from database and combining required fields in specific format.
Thanks for posting back - using
columns.render
in that way looks like a good option.Allan