Which callback to use to not display DataTable if recordsTotal is 0?

Which callback to use to not display DataTable if recordsTotal is 0?

rnduserrnduser Posts: 2Questions: 1Answers: 0
edited August 2014 in Free community support

Which callback to use to not display DataTable if recordsTotal is 0?

Hi,
I'm using DataTable server side processing and it so cool and awesome. Thank you guys for such a great piece of free and open source software. What a time to be alive?
I'm trying to show custom html in place of DataTable if there no records to show in the DataTable instead of the generic "No data available in table" text. Remember, I'm not trying to change the text. I want to simply not show any table html and display display complete new html element. The issue I'm having is not finding the right callback to use to do so?

I used "initComplete" callback which has settings and json as parameters, and checked json's recordsTotal to see if it is 0 or not and displayed the custom html element. It works but since it is initComplete it works only for the first time.
I was looking for similar callback that gives me the json data return from server side request in which I can check recordsTotal and do action, but does it every time serverside request is made. Maybe I'm missing on some callback?

Regards,
Humble DataTable user

This discussion has been closed.