Вы можете скрыть сетку и показать сообщение.
Markup:
<div id="noRecords" style="display:none"> There are no records </div>
<div id="dataTableContainer">
... (here goes your datatable)
</div>
Javascript:
if(count_of_returned_data == 0){
$("#noRecords").show();
$("#dataTableContainer").hide();
}else{
$("#noRecords").hide();
$("#dataTableContainer").show();
}
Надеюсь, это поможет. Приветствия