Get the innerHtml of a cell using fnGetData(row, col)

Get the innerHtml of a cell using fnGetData(row, col)

mentalraymentalray Posts: 1Questions: 1Answers: 0
edited May 2015 in Free community support

Hello

I am trying to figure out a way of retrieving the innerHtml of a specific cell and not the text value only. If I use the fnGetData method with a row only, I can get the full data of the row as an object which is cool but how can I get the innrHtml of a specific cell so that I do not have to search manually in the obj to find the innerHtml of the cell I want?

Thank you!

P.S. Amazing tool :)

Answers

  • allanallan Posts: 61,799Questions: 1Answers: 10,115 Site admin

    Use the fnGetNodes method and then a little bit of jQuery. Or using the 1.10+ API use cell().node() to get the element for the cell, from which you can then read the HTML.

    Allan

This discussion has been closed.