Rearranging server-side columns on client side
Rearranging server-side columns on client side

Hi,
I've got a server-side script that returns x columns a_1, a_2, a_3, ..., a_x.
How can I rearrange these columns on the client side into y != x DataTable columns b_1, b_2, b_3, ..., b_y?
This is the idea:
- The PHP server returns unformatted data such as integers, floats, etc.
- The JavaScript client assembles the HTML/CSS view.
Client-side processing example:
b1 = "Foo: " a1
b2 = a2 + " bar " + a3,
b3 = "<button>" + a4 "</button>"
...
I can't find any callbacks that could be used to solve this problem.
Answers
Okay, I've found the solution myself.
See columns.render > Examples > Show ellipsis for long strings
https://datatables.net/reference/option/columns.render