Search code examples
jqueryjqgrid

jqGrid is displaying only "IsNull" and "Is Not Null" options in search


I am using jqGrid 4.15.6-pre with local datatype. I have enabled multipleSearch: true but I am getting only "IsNull" and "Is Not Null" as search option. Below is my code

 $("#dataGrid").jqGrid({
            datatype: "local",
            data: mydata,
            colNames: ['Student_ID', 'STATUS', 'TYPE', 'DESCRIPTION', 'COPIES'],
            colModel: [
                            { name: 'Student_ID', index: 'Student_ID', width: 80},
                            { name: 'STATUS', index: 'STATUS', width: 160 },
                            { name: 'TYPE', index: 'TYPE', width: 180 },
                            { name: 'DESCRIPTION', index: 'DESCRIPTION', width: 180 },
                            { name: 'COPIES', index: 'COPIES', width: 180 }
            ],
            pager: '#pagingGrid',
            sortname: 'Student_ID',
            gridview: true,
            rownumbers: true,
            viewrecords: true,
            loadonce: true,
            gridview: true,
            sortorder: "desc",
            caption: 'Just simple local grid',
            height: '100%'
        });

        $("#dataGrid").jqGrid('navGrid', '#pagingGrid', { edit: false, add: false, del: false }, {}, {}, {}, { multipleSearch: true, closeAfterSearch: true });

Solution

  • It sound strange. Could you provide the demo, which reproduces the problem? I suppose that you included wrong JS files. Look at the demo https://jsfiddle.net/OlegKi/4o5hsyba/ for example, which demonstrates a typical usage of Searching Dialog in free jqGrid. All search options are displayed correctly. In general, one can define sopt array of searchoptions property in every column definition of colModel or to set common default sopt value. In the way you can replace default list of search option to another one (two option "IsNull" and "Is Not Null" for examples).