Jqgrid-标题列中仅显示一个搜索选项

时间:2018-12-03 09:22:06

标签: jqgrid

我在Jqgrid中工作,遇到问题。我看过许多示例并阅读了许多文档,但似乎无法确定为什么在列标题中只出现一个搜索选项,而不是诸如“ ge”,“ le”,“ eq”等其他选项?

这是我的代码:

jQuery("#jQGridDemo").jqGrid({
            url: 'http://localhost:58404/JQGridHandler.ashx',
            datatype: "json",
            colNames: ['Property ID', 'Property Ref', 'Short Address', 'Scheme Code', 'Scheme Name', 'Property Type', 'Tenure Type', 'Status'],
            colModel: [
                        { name: 'PropertyID', index: 'PropertyID', width: 70, align: "left", searchoptions: {sopt: ["ge","le","eq"]}, sortable: true},
                        { name: 'PropertyRef', index: 'PropertyRef', width: 75, align: "left", stype: 'text', sortable: true},
                        { name: 'ShortAddress', index: 'ShortAddress', width: 200,  align: "center",  search:true, stype: 'text', searchoptions: {sopt: ["cn","ge","le","eq"]}, sortable: true},
                        { name: 'SchemeCode', index: 'SchemeCode', width: 80, align: "center", sortable: true },
                        { name: 'SchemeName', index: 'SchemeName', width: 80, align: "center",  stype: 'text', sortable: true },
                            {name: 'PropertyType',width: 80, align: "center",},
                        { name: 'TenureType', index: 'TenureType', width: 80, align: "center",  sortable: true },
                        { name: 'Status', index: 'Status', width: 75,  align: "center", sortable: true },
],

            beforeProcessing: function (data) {
                //Create the filters
                getDropDownValues(data, 'PropertyType')
                getDropDownValues(data, 'TenureType')
                getDropDownValues(data, 'Status')

                $(this).jqGrid('destroyFilterToolbar')

                .jqGrid('filterToolbar', {
                   stringResult: true,
                    searchOperators: true
                });
            },

            onSelectRow: function(id){
        if(id && id!==lastsel2){
            jQuery('#jQGridDemo').jqGrid('restoreRow',lastsel2);
            jQuery('#jQGridDemo').jqGrid('editRow',id,true);
            lastsel2=id;
        }
            },
            height: 'auto',
            width: 'auto',
            rowNum: 30,
            editable: true,
            mtype: 'GET',
            loadonce: true,
            rowList: [30, 40, 50],
            pager: '#jQGridDemoPager',
            sortname: 'PropertyId',            
            viewrecords: true,
            sortorder: 'desc',
            caption: "Property Details",
            editurl: 'http://localhost:58404/JQGridHandler.ashx'
        });

0 个答案:

没有答案
相关问题