Creating extra columns

Creating extra columns

MilesyMilesy Posts: 3Questions: 0Answers: 0
edited August 2011 in General
I am curently fetching my data using Ajax, but how can I create additional columns which are NOT in the Ajax data? Say I want to create a column which does a sum of three of the other columns and displays the value. I do not want to increase my data size from the server and it makes sense to do this on the front end.

Thanks

Chris

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    (I could be wrong about this).
    ------------------------

    not sure if you can do this using the traditional aaData (arrays of arrays).

    But if you use the object form of aaData (arrays of objects) and use mDataProp (which allows columns to have a null mDataProp, hence not draw from the aaData) you can have extra columns that you then compute (using fnRender or some other callback).

    converting from aaData array form to object form won't really increase your storage requirement, but might be a bit of work.
This discussion has been closed.