Do not show table when there is no data
Do not show table when there is no data
![jsiddharth](https://secure.gravatar.com/avatar/b7d46191dbad1b43aa357073e4e47e08/?default=https%3A%2F%2Fvanillicon.com%2Fb7d46191dbad1b43aa357073e4e47e08_200.png&rating=g&size=120)
A developer has used this library to integrate into our app. But has forgotten to manage the case where the data set is 0 sized. How is this case handled ?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The default way it is handled is to show a message in the table stating that it is empty: http://live.datatables.net/labosele/1/edit .
If you want to hide it completely, use
drawCallback
and hide the container if there are no records (page.info()
andtable().wrapper()
are the two methods you'll need).Allan
My java ajax method returns "" if there is no data.
Ajax Code
I had a
I removed it and placed it inside
It worked. Thanks