Receiving some "Objects" with server-side processing

Receiving some "Objects" with server-side processing

franquisfranquis Posts: 7Questions: 0Answers: 0
edited December 2010 in General
Hi everyone!

I'm using the server-side processing feature and I would like to add objects in the server response.

[code]
{"sEcho": 1, "iTotalRecords": 240, "iTotalDisplayRecords": 240, "aaData": [ ["#1","#2",{"vendor":"cc","version":"7.0.R5","hostname":"nmd1"},"#4",{"id":"3","statut":{"title":"OK","class":"btn_mark_erreur statut_ok"},"suivi":{"class":"btn_suivi_erreur suivi_ko","title":"Follow"}}], ....

[/code]

I'm using the fnRowCallback function and want to build HTML from these data:

[code]
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
var row_hostname = "

Replies

  • franquisfranquis Posts: 7Questions: 0Answers: 0
    When having a look on the dataTables.js source code, I found the _fnAddData function and specially:
    [code]
    /* Cast everything as a string - so we can treat everything equally when sorting */
    if ( typeof aData[i] != 'string' )
    {
    aData[i] += "";
    }
    [/code]

    I wonder if there is nothing to change here to solve my problem...

    Any ideas?

    Tks
This discussion has been closed.