No content yet

No content yet

nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
edited November 2012 in DataTables 1.9
Hi,

In my datatables, I am showing data based on a join. An outer join (i.e. even if there is no matching record in the child table, the row should still show, with an empty value in the cell.

However, I get the following alert:

#

DataTables warning (table id = 'tblPatients'): Requested unknown parameter 'tblPatientTests.PName' from the data source for row 0

#

Is there a way to override (silence) this error? Because in some cases, there will be data, in some cases, there won't...

/Thanks

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Yes - use sDefaultContent to supply DataTables with something to show. As you say there is no data to show, but DataTables is expecting something, thus it throws up the warning. But you can tell it want to display when there is no content with sDefaultContent. Typically it would be an empty string, but it could easily be `No data` etc.

    Allan
This discussion has been closed.