How to show empty rows and not custom message in Datatables if there is no matching search?
How to show empty rows and not custom message in Datatables if there is no matching search?
![ipivanov](https://secure.gravatar.com/avatar/cf162e56e4ec98a8a089fd5bebd5f93b/?default=https%3A%2F%2Fvanillicon.com%2Fcf162e56e4ec98a8a089fd5bebd5f93b_200.png&rating=g&size=120)
As far as my research went i only could find how i can change the message "No matching records found" at my custom message.
If there is no matching result i want to be displayed 5 empty rows.
How to display empty rows if there is no matching search in Datatables if posible?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You could use
draw
andpage.info()
to discover when DataTables has drawn the table with no records shown. Then use a little bit of jQuery to just insert the empty rows you want.Allan