How can I implement new line in a column (DataTables) -


i have sql query grabs data (language column in dbtable table). query uses group_concat, 1 cell has several results, e.g.

"ajax, jquery, html, css". 

what want show result in new lines, like:

"ajax jquery html css" 

how can that?

i tried make changing "columns": [{ "data": "id" }, { "data": "languages" }... didn't work.

i tried fix adding "< br >" in query separator, didn't work.

thank you!

you can use columns.render function column this:

var table = $('#example').datatable({     columns: [         null,         null,         {             "render": function(data, type, row){                 return data.split(", ").join("<br/>");             }         }     ] }); 

working example.

hope helps , i've understood problem.


Comments