Php jqGrid空搜索选项

Php jqGrid空搜索选项,php,jquery,search,jqgrid,Php,Jquery,Search,Jqgrid,我正在使用自定义搜索按钮执行多重搜索。 查看firebug,发送到服务器的请求中似乎缺少参数 _search true filters {"groupOp":"AND","rules":[{"field":"name","op":"bw","data":"A"}]} nd 1307956101759 page 1 rows 20 searchField searchOper searchString 当我使用默认搜索按钮时,所有参数都正确地设置了值,搜索返回匹配的行 jQu

我正在使用自定义搜索按钮执行多重搜索。 查看firebug,发送到服务器的请求中似乎缺少参数

_search true
filters {"groupOp":"AND","rules":[{"field":"name","op":"bw","data":"A"}]}
nd  1307956101759
page    1
rows    20
searchField 
searchOper  
searchString
当我使用默认搜索按钮时,所有参数都正确地设置了值,搜索返回匹配的行

jQuery("#poi_grid").jqGrid({ 
    url:'php/retrieve_pois.php', 
    editurl:'php/edit_pois.php',
    datatype: "json", 
    colNames:['Name', 'Region', 'Type','Website','PDF','Lat','Lon'], 
    colModel:[ 
        {name:'name',index:'name', width:150, search:true, editable:true}, 
        {name:'region',index:'region', width:70, search:true, editable:true}, 
        {name:'type',index:'type', width:70, search:true, editable:true}, 
        {name:'website',index:'website', width:90,sortable:false,search:false, editable:true}, 
        {name:'pdf',index:'pdf', width:150,align:"right",sortable:false,search:false, editable:true}, 
        {name:'lat',index:'lat', width:60, sortable:false,search:false, editable:true}, 
        {name:'lon',index:'lon', width:60, sortable:false,search:false, editable:true},
    ], 
    pager:'#pager',
    rowNum:20, 
    rowList:[20,30,50], 
    sortname: 'name', 
    viewrecords: true, 
    sortorder: "asc",
    height:259,
    onSelectRow: function(id){
        if(id && id!==rowid){
            jQuery('#poi_grid').restoreRow(rowid);  //restore last grid row
            rowid=id;   //save current row ID so that when focus is gone it can be restored
        }
    }
}); 
//Pager
jQuery("#poi_grid").jqGrid('navGrid','#pager',
    {edit:false,add:false,del:false,search:false,refresh:false}
)
//Custom buttons
.navButtonAdd('#pager',{
    caption:"",
    title:"Search", 
    buttonicon:"ui-icon search", 
    onClickButton: function(){ 
        jQuery("#poi_grid").jqGrid('searchGrid', {
            sopt:['eq','ne','cn','bw','bn'],
            multipleSearch:true
        });
    }, 
    position:"last"
 });

我做错了什么。。。但是什么呢?提前谢谢你

除了sidx=name和sord=asc之外,我不认为请求中缺少什么,它们将被发送,但不包括在您的数据中


因为您使用了searchGrid的选项,所以有关搜索参数的所有信息都编码在参数对应的过滤器中。在多重搜索中使用的空参数searchField=、searchString=和searchOper=应该被忽略。

sidx和sord被发送。。。对不起,我在第一封邮件中没有抄写它们。我仍在设法为多重搜索找到解决方案,但我不知道如何以及在何处设置过滤器。你能给我看一个代码示例吗?Thanks@alessiodl字体你没有写下你所缺少的东西。可能会给你丢失的信息?如果您正在搜索其他内容,您应该更准确地指定它。可能我没有很好地解释这个问题。使用multipleSearch:true搜索功能停止工作,我不知道是否需要在第一篇文章中报告的网格代码中添加一些内容。我要检查你链接的答案!Thx@alessiodl对不起,我还是不明白你的意思。在搜索功能下停止工作是什么意思?怎么了?您是否在服务器端实现了网格过滤?