Using jqGrid's emptyrecords option
Solution 1:
You should verify how are the value of data
parameter (the value of pages
in your case). I suppose the value is null
or {}
instead of []
.
UPDATED: You can also consider to set current page from 1 to 0 how it shows the small demo.
UPDATED 2: Of cause you can place the text about empty rows on the place of the table. In the case you have to remove height: 'auto'
to be able to see the text. Look at another demo which show this.
Solution 2:
If anyone here has an issue with the JQGrid not showing the message "No Records To View", ensure that you have set the viewrecords: true
option.
emptyrecords - Display the information when the returned (or the current) number of records is zero. This option is valid only if viewrecords option is set to true.