If there was no data returned from our search currently we use the loadComplete
callback to print out a message to the user to indicate that there is no data. Is th
To Oleg: Yes you are right, since To Marcus: See the below approach of what I did in one of the project. I pasted the HTML snippet - and HTML: Java Script:jqGrid
shows the message only in the pager i.e. navGrid. So placing one loadComplete
implementation, where you have to trigger your logic to show the "No records to show" message.
loadComplete: function() {
if (j$(this).getGridParam("records")==0)
{
j$('div#pagination').hide();
if (j$('div.noResultsDiv').hasClass('jstHidden'))
{
j$('div.noResultsDiv').removeClass('jstHidden');
}
}
else
{
j$('div#pagination').show();
if (j$('div.noResultsDiv').length>0)
{
j$('div.noResultsDiv').addClass('jstHidden');
}
}
}