Improvements on server side answer parse

Improvements on server side answer parse

grey2kgrey2k Posts: 2Questions: 0Answers: 0
edited March 2013 in Feature requests
Is it possible to make each column value also an object (like row) for add a custom options like attributes, classes, ids and etc.

for example i render with HTML5 data attributes for additional handling events of my Application ,

ang it will be perfect if i can render for example ;

Replies

  • allanallan Posts: 63,419Questions: 1Answers: 10,456 Site admin
    You can use fnCreatedCell to do this. Set mData to the value you want for the display and then use fnCreatedCell to add the required attributes from the required data properties.

    Yes it would be possible to change DataTables to add attributes based on the object (a bit like how `DT_RowId` and `DT_RowClass` works), but it would be less flexible, used not very often and add more weight to DataTables. So until this is a feature request that shows it would add a lot to the capabilities of DataTables, fnCreatedCell is the way to do this :-)

    Allan
  • grey2kgrey2k Posts: 2Questions: 0Answers: 0
    Thanks for the solution!
This discussion has been closed.