如何禁用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: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屋!