When Server-Side-Processing: How to render Column Data ?
When Server-Side-Processing: How to render Column Data ?
mdesign
Posts: 72Questions: 17Answers: 0
How can i render Columns Data, when using ssp-class ?
I tried to render the column Array, like i do within my editor Examples, but this doesn't work here.
var thisDataTable = $('table').DataTable( {
ajax: 'ssp-script.php',
// (!) doesn't work here
columns: [
{
data: null,
defaultContent: ''
},
{
data: 'last_name',
className: '-text-left -text-bold'
},
{
data: 'first_name',
className: '-text-left -text-bold'
},
{
data: 'position',
className: '-text-left'
},
],
This discussion has been closed.
Answers
and this is ssp-script.php
Hi @mdesign ,
It should do, what's not happening? Isn't the class being applied to the cell? Would you be able to link to a page, and we can take a look.
Cheers,
Colin
i startet with your example for server_processing.php
stops working, when i add columns[]
http://live.datatables.net/jidosuda/1/edit
Hi @mdesign ,
That's because that script is returning arrays of data, whereas you were trying to access it with objects. I've changed it so it's accessing the array here.
Cheers,
Colin