Hide footer info

Hide footer info

shidhu40shidhu40 Posts: 2Questions: 1Answers: 0

Hello
I want to hide footer info in case of empty data.

I have used this.
var nNodes = oTable.fnGetNodes();
if($(nNodes).filter('tr').length == 1){
$('.dataTables_info').hide();
}

But it not the best way. So How can I uses bInfo false in case of empty data

Answers

  • allanallan Posts: 63,704Questions: 1Answers: 10,502 Site admin

    It might not be the best way, but it is probably the only way at this time. You could use rows( { page: 'current' } ).any() to check if there are any rows, rather than the legacy API, but that's about it.

    Allan

  • shidhu40shidhu40 Posts: 2Questions: 1Answers: 0

    Hi Allan,

    Thanks for response. Can you any example How can I use this code.
    Any working example.

  • allanallan Posts: 63,704Questions: 1Answers: 10,502 Site admin

    Happy to provide working examples under the priority support options. In this case, it is just an API call - see rows() and any() for details about the methods I used above.

    Allan

This discussion has been closed.