0
我正在写一段代码,其中我有一个jqgrid和一个过滤器的顶部的文本框,我已经使用jquery ui自动完成功能,一切工作正常,但我需要现在定制功能,即自动完成结果,当我选择一个选项,它应该筛选结果选择。以下是如下的例子:jqgrid自动完成重新加载网格选项
// i am doing a search on the textbox with auto complete feature
grid.jqGrid('setColProp', 'Name',
{
searchoptions: {
sopt:['cn'],
dataInit: function(elem) {
$(elem).autocomplete({
source:getUniqueNames('Name'),
delay:0,
minLength:0,
matchContains: true,
autoFill:true,
select:function(event,ui){
grid.setGridParam('postData', ui.item.value);
//grid.jqGrid('clearGridData');
grid.trigger('reloadGrid');
return false;
// need to write the code which will trigger the reload here on selection
}
});
}
}
});
在选择功能,我需要在jqGrid的要加载所选的选项,我怎么能做到这一点。请建议解决方案。