Adding column with fnRender

Adding column with fnRender

bsnyderbsnyder Posts: 2Questions: 0Answers: 0
edited August 2012 in General
http://debug.datatables.net/upibud

Hello,

I'm trying to add a column after the ajax call using fnRender using the steps detailed @ http://datatables.net/forums/discussion/3193/adding-link-or-button-into-the-datatable-row/p1

It works great! However, when the page is first loaded, a Datatables warning alert pops up complaining of unknown parameter.

Could anyone offer any help? It would be greatly appreciated.

Replies

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    You need to set a default content ( sDefaultContent ) for the column - a empty string will do. Reason for this is that fnRender takes the value of the cell and passes it into the callback function as the second parameter. If there is no value to pass, you get a warning.

    Allan
  • bsnyderbsnyder Posts: 2Questions: 0Answers: 0
    Perfect! Thank you very much Allan.
This discussion has been closed.