Hi,
You can use javascript like this in the begining in the module header:
<script>if('0'=='»getObject:viewPage.gridView.VirtualItemCount«'){document.write('<'+'!-- ')}</script>
and in the end of the module header:
<script>if('0'=='»getObject:viewPage.gridView.VirtualItemCount«'){document.write(' --'+'>')}</script>
Code writes html comment block when there is no records.
Kind regards,
Primoz