InitComplete event to be able to display a message

InitComplete event to be able to display a message

klermannklermann Posts: 277Questions: 67Answers: 1

Hello Allan, I'm trying to use the initComplete event to be able to display a message for when the datatable is empty with no data, and when to contain any item (data) from an item the event delete the message. Only this event loads only once it does not come in when it is dynamically loaded to fire oTable.ajax.load (). How can I resolve this issue using the datatable events?
`"initComplete": function(settings, json) {

                if(json.iTotalDisplayRecords == 0){
                    $(this).html('<div class="div-message">Message</div>');
                }
                if(json.iTotalDisplayRecords == 1){
                            $('div-message').hide();
                            oTable.ajax.load();
            }
              },`

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.