Server Side 0 Results

Server Side 0 Results

jcrawfordjcrawford Posts: 172Questions: 0Answers: 0
edited September 2011 in General
Is there a nice way to have DataTables return something like

[code]
No Results Found
[/code]

Currently it throws javascript alerts unless I return an empty json array for an empty row. If I do that it says 'Showing 1 to 1 of 1 rows' and there is just the table header/footer crammed together.

Replies

  • allanallan Posts: 63,531Questions: 1Answers: 10,474 Site admin
    Can you link me to an example which has the problem you describe please? If you look at my server-side example ( http://datatables.net/release-datatables/examples/data_sources/server_side.html ) and type "tapestry" into the filter box, there will be no results found and an empty array returned in the JSON. DataTables will automatically insert the no results found row.

    Allan
  • jcrawfordjcrawford Posts: 172Questions: 0Answers: 0
    I cannot link you to a working version as it is local only currently. However I failed to mention that on this particular table I had bFilter set to FALSE so I was not using the search bar.

    A picture can be seen at

    http://www.josephcrawford.com/pics/no-data.png

    Thanks,
    Joseph Crawford
  • jcrawfordjcrawford Posts: 172Questions: 0Answers: 0
    my bad it appears it was working correctly :)

    No data available in table

    Is there a way to customize this message?
  • allanallan Posts: 63,531Questions: 1Answers: 10,474 Site admin
    http://datatables.net/ref#oLanguage.sZeroRecords

    Allan
This discussion has been closed.