How to include ID and class attributes for rows returned from server side callback?

How to include ID and class attributes for rows returned from server side callback?

mungletmunglet Posts: 14Questions: 0Answers: 0
edited May 2009 in General
I'm using the serverside functionality of DataTables and the data I'm reporting on is in a hierarchical format.

During initialization I have bServerSide set to true true and sAjaxSource set appropriately.

When I get additional rows from the ajax callback I need to be able to include the id and class of each row returned because they are what are used for creating the drilldown formatting, for example:



It seems that the aaData returned is just a string array and I was wondering how I can include the id and class for each row returned?

Thanks.

Replies

  • mungletmunglet Posts: 14Questions: 0Answers: 0
    My current thought is that I could return the class and id in a hidden column and then update the class and id for each row via the fnRowCallback function?
  • allanallan Posts: 61,663Questions: 1Answers: 10,094 Site admin
    fnRowCallback() is exactly how I would recommend that you do this. :-). With the information from your hidden column you can manipulate the nodes for a particular row as it is created to add IDs / classnames etc.

    Regards,
    Allan
This discussion has been closed.