jqGrid - supply no data message in the grid?

前端 未结 3 620
粉色の甜心
粉色の甜心 2021-01-21 18:09

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

3条回答
  •  不思量自难忘°
    2021-01-21 18:39

    jqGrid displays "No records to view" message ($.jgrid.defaults.emptyrecords) only at the end of the pager area and only in the case if all following take place

    • you define a pager
    • viewrecords: true
    • the current number of record counts (reccount parameter) is 0.

    It is unknown to me any "standard" way to display a message inside of grid data area (on top of the body of grid). It seems to me if you need such message you have to continue to use div placed over the grid body and hide/show it inside of loadComplete event handle.

提交回复
热议问题