【发布时间】:2011-09-13 13:22:28
【问题描述】:
标题中的问题几乎完成了:有什么方法可以使用 jquery 来查找 jqGrid 对象处理的元素?
更准确地说,我希望在网格上调用一个 reload 方法,如果页面上存在一个。 我正在使用以下代码
...
success: function (data) {
//Check if there is a jqGrid on the page and if present, reloads its data
var jqGrid = $('.ui-jqgrid');
if ( jqGrid.length ) {
//get the grid id. The actual id object is in the form of "gbox_your_grid_id"
var gridid = "#" + jqGrid.attr('id').substring(5);
//time to reload
$(grid).trigger('reloadGrid');
}
}
但似乎从未调用过 reloadGrid 方法。有什么建议吗?
【问题讨论】:
标签: jquery jquery-plugins jquery-selectors jqgrid