如何在 jqGrid 中禁用自动加载? [英] How to disable autoload in jqGrid?
问题描述
如何在 jqGrid 中禁用自动加载并在需要时手动加载数据?
How to disable autoload in jqGrid and load data manually when I need it?
谢谢.
推荐答案
如果您将 datatype
设置为 'local'
,则不会加载来自服务器的数据.要强制加载数据,您可以根据 setGridParam
将 datatype
更改为 'json'
或 'xml'
方法(参见 http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options 和 http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods#grid_related_methods) 然后调用 trigger("reloadGrid")
方法.
If you set datatype
to 'local'
the data from the server will be not loaded. To force the loading of data you can change datatype
to 'json'
or 'xml'
with respect of setGridParam
method (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options and http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods#grid_related_methods) and then call trigger("reloadGrid")
method.
参见 jqGrid 未加载数据,其中也有相关信息你问的.
See jqGrid is not loading data which has also the information what you asked.
这篇关于如何在 jqGrid 中禁用自动加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!